gdb: testsuite: print explicit test result for gdb.base/dfp-test.exp

Message ID 20220105054702.9198-1-yangtiezhu@loongson.cn
State New
Headers show
Series
  • gdb: testsuite: print explicit test result for gdb.base/dfp-test.exp
Related show

Commit Message

Tiezhu Yang Jan. 5, 2022, 5:47 a.m.
In the current code, if decimal floating point is not supported for
this target, there is no binary file dfp-test, and also there is no
test result after execute the following commands:

  $ make check-gdb TESTS="gdb.base/dfp-test.exp"
  $ grep error gdb/testsuite/gdb.log
  /home/loongson/gdb.git/gdb/testsuite/gdb.base/dfp-test.c:39:1: error: decimal floating point not supported for this target
  [...]
  $ cat gdb/testsuite/gdb.sum
  [...]
  Running target unix
  Running /home/loongson/gdb.git/gdb/testsuite/gdb.base/dfp-test.exp ...

		  === gdb Summary ===
  [...]

With this patch:

  $ make check-gdb TESTS="gdb.base/dfp-test.exp"
  $ cat gdb/testsuite/gdb.sum
  [...]
  Running target unix
  Running /home/loongson/gdb.git/gdb/testsuite/gdb.base/dfp-test.exp ...
  UNSUPPORTED: gdb.base/dfp-test.exp: decimal floating point not supported for this target.

		  === gdb Summary ===

  # of unsupported tests		1
  [...]

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>

---
 gdb/testsuite/gdb.base/dfp-test.exp | 1 +
 1 file changed, 1 insertion(+)

-- 
2.27.0

Comments

Tom Tromey Jan. 5, 2022, 5:28 p.m. | #1
>>>>> ">" == Tiezhu Yang <yangtiezhu@loongson.cn> writes:


>> In the current code, if decimal floating point is not supported for

>> this target, there is no binary file dfp-test, and also there is no

>> test result after execute the following commands:

[...]

Thank you.  This is ok.

Tom

Patch

diff --git a/gdb/testsuite/gdb.base/dfp-test.exp b/gdb/testsuite/gdb.base/dfp-test.exp
index e43ecd0e15e..75769ce29d0 100644
--- a/gdb/testsuite/gdb.base/dfp-test.exp
+++ b/gdb/testsuite/gdb.base/dfp-test.exp
@@ -23,6 +23,7 @@  standard_testfile .c
 # Try to compile the test case.  If we can't, assume the
 # toolchain does not yet provide DFP support and bail out.
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {quiet debug}] != "" } {
+    unsupported "decimal floating point not supported for this target."
     verbose "Skipping DFP tests."
     return -1
 }