* gdb.base/float.exp: Add test for loongarch

Message ID 20230309120147.16658-1-lihui@loongson.cn
State New
Headers
Series * gdb.base/float.exp: Add test for loongarch |

Commit Message

Hui Li March 9, 2023, 12:01 p.m. UTC
  The test results on loongarch platform are as follows:

Without this patch:

```
$ make check-gdb TESTS="gdb.base/float.exp"
=== gdb Summary ===

 # of expected passes		2
 # of unexpected failures	1

```
With this patch:

```
$ make check-gdb TESTS="gdb.base/float.exp"
=== gdb Summary ===

 # of expected passes		3

```

Signed-off-by: Hui Li <lihui@loongson.cn>
---
 gdb/testsuite/gdb.base/float.exp | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Tom Tromey March 9, 2023, 6:04 p.m. UTC | #1
>>>>> "Hui" == Hui Li <lihui@loongson.cn> writes:

Hui> The test results on loongarch platform are as follows:
Hui> Without this patch:

Looks good to me, thank you.

Reviewed-By: Tom Tromey <tom@tromey.com>

Tom
  

Patch

diff --git a/gdb/testsuite/gdb.base/float.exp b/gdb/testsuite/gdb.base/float.exp
index 7f230cb6f61..5e9be538b73 100644
--- a/gdb/testsuite/gdb.base/float.exp
+++ b/gdb/testsuite/gdb.base/float.exp
@@ -126,6 +126,8 @@  if {[is_aarch64_target]} {
 	      pass "info float (without FPU)"
 	}
     }
+} elseif {[istarget "loongarch*-*-*"]} {
+    gdb_test "info float" "f.*fcc0.*fcsr.*" "info float"
 } else {
     gdb_test "info float" "No floating.point info available for this processor." "info float (unknown target)"
 }