[PATCH][gdb/testsuite] Ignore pass/fail/unsupported in gdb-caching-proc.exp

Tom de Vries tdevries@suse.de
Thu Feb 13 10:58:00 GMT 2020


Hi,

After de-installing gnatmake, I get:
...
Running src/gdb/testsuite/gdb.base/gdb-caching-proc.exp ...
FAIL: gdb-caching-proc.exp: failed to compile gnat-debug-info test binary
  ...
FAIL: gdb-caching-proc.exp: failed to compile gnat-debug-info test binary
...

In gdb.sum, we see these FAILs (each paired with an UNSUPPORTED as well)
followed by:
...
PASS: gdb-caching-proc.exp: gnat_runtime_has_debug_info consistency
...

Fix this by ignoring PASS/FAIL/UNSUPPORTED during testing, such that we have
just the consistency PASS/FAIL.

Tested on x86_64-linux, with gnatmake installed and de-installed.

OK for trunk?

Thanks,
- Tom

[gdb/testsuite] Ignore pass/fail/unsupported in gdb-caching-proc.exp

gdb/testsuite/ChangeLog:

2020-02-13  Tom de Vries  <tdevries@suse.de>

	* gdb.base/gdb-caching-proc.exp (ignore_pass, ignore_fail)
	(ignore_unsupported): New proc.
	(test_proc): Temporarily rename pass/fail/ignore to
	ignore_{pass,fail,ignore} in order to ignore PASS/FAIL/IGNORE messages
	from the tested procs.

---
 gdb/testsuite/gdb.base/gdb-caching-proc.exp | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/gdb/testsuite/gdb.base/gdb-caching-proc.exp b/gdb/testsuite/gdb.base/gdb-caching-proc.exp
index b2d71a5e7d..536d7e89c1 100644
--- a/gdb/testsuite/gdb.base/gdb-caching-proc.exp
+++ b/gdb/testsuite/gdb.base/gdb-caching-proc.exp
@@ -22,12 +22,29 @@
 # number of reruns is constant-bounded, and the increase in runtime is bound to
 # this test-case, and could be disabled on slow targets.
 
+proc ignore_pass { args } {
+
+}
+proc ignore_fail { args } {
+
+}
+proc ignore_unsupported { args } {
+
+}
+
 # Test gdb_caching_proc NAME
 proc test_proc { name } {
     set real_name gdb_real__$name
 
     set resultlist [list]
 
+    rename pass save_pass
+    rename fail save_fail
+    rename unsupported save_unsupported
+    rename ignore_pass pass
+    rename ignore_fail fail
+    rename ignore_unsupported unsupported
+
     set first [$real_name]
     lappend resultlist $first
 
@@ -44,6 +61,13 @@ proc test_proc { name } {
 	}
     }
 
+    rename pass ignore_pass
+    rename fail ignore_fail
+    rename unsupported ignore_unsupported
+    rename save_pass pass
+    rename save_fail fail
+    rename save_unsupported unsupported
+
     if { $racy  == 0 } {
 	pass "$name consistency"
     } else {



More information about the Gdb-patches mailing list