[PATCH] Fix random dejagnu test abort with simulator target
Bernd Edlinger
bernd.edlinger@hotmail.de
Fri Apr 19 10:49:37 GMT 2024
This is probably a dejagnu issue with the gdb testsuite
when a simulator target is used. I observed random
testrun aborts with dejagnu 1.6.2-1 from ubuntu 20.04
The problem starts when the test case gdb.base/sigwinch-notty.exp
tries to execute "sleep", although that is impossible with a
simulator. And for unknown reason the test case completes
(with errors) before the "after 1000" block is run.
Then in a totally different test this happens with 50% likelihood:
ERROR: (DejaGnu) proc "bgerror {can't read "gdb_pid": no such variable}" does not exist.
The error code is TCL LOOKUP COMMAND bgerror
The info on the error is:
invalid command name "bgerror"
while executing
"::tcl_unknown bgerror {can't read "gdb_pid": no such variable}"
("uplevel" body line 1)
invoked from within
"uplevel 1 ::tcl_unknown $args"
=== gdb Summary ===
# of expected passes 30815
# of unexpected failures 241
# of expected failures 3
# of known failures 23
# of unresolved testcases 241
# of untested testcases 96
# of unsupported tests 532
# of paths in test names 1
So the whole test run is aborted in the middle.
This patch should fix the issue.
---
gdb/testsuite/gdb.base/sigwinch-notty.exp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/testsuite/gdb.base/sigwinch-notty.exp b/gdb/testsuite/gdb.base/sigwinch-notty.exp
index cef21c07c59..0f70f0978d2 100644
--- a/gdb/testsuite/gdb.base/sigwinch-notty.exp
+++ b/gdb/testsuite/gdb.base/sigwinch-notty.exp
@@ -21,7 +21,7 @@ require {!target_info exists gdb,nosignals}
# The testfile relies on "run" from the command line, so only works
# with "target native".
-if { [target_info gdb_protocol] != "" } {
+if { [target_info gdb_protocol] != "" || [target_info is_simulator] != ""} {
return
}
--
2.39.2
More information about the Gdb-patches
mailing list