]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite] Fix gdb.base/return.exp on arm-linux
authorTom de Vries <tdevries@suse.de>
Mon, 23 Sep 2024 07:47:26 +0000 (09:47 +0200)
committerTom de Vries <tdevries@suse.de>
Mon, 23 Sep 2024 07:47:26 +0000 (09:47 +0200)
After doing pre-commit testing of some patch on arm-linux, the Linaro CI
reported:
...
FAIL: 1 regressions: 1 improvements

regressions.sum:
=== gdb tests ===

Running gdb:gdb.base/return.exp ...
ERROR: no fileid for ccd235fdc9bf

improvements.sum:
=== gdb tests ===

Running gdb:gdb.base/return.exp ...
ERROR: no fileid for 017e9b314c5a
...

The problem is the call to allow_float_test.  It calls gdb_exit (for arm-linux
only), and consequently kills the gdb instance setup by prepare_for_testing:
...
if { [prepare_for_testing "failed to prepare" "return"] } {
     return -1
}

set allow_float_test [allow_float_test]
...

Fix this by moving the call to allow_float_test to before prepare_for_testing.

Tested on arm-linux and x86_64-linux.

gdb/testsuite/gdb.base/return.exp

index 29de9954bd4eb8349371d749f3e2300a98034f99..23016f83745b78861b3a53e9c79d1cbbeaf7718e 100644 (file)
 
 # This file was written by Jeff Law. (law@cs.utah.edu)
 
+set allow_float_test [allow_float_test]
+
 if { [prepare_for_testing "failed to prepare" "return"] } {
     return -1
 }
 
-set allow_float_test [allow_float_test]
-
 proc return_tests { } {
     global gdb_prompt allow_float_test