When running gdb.base/solib-overlap.exp, I get:
...
Running src/gdb/testsuite/gdb.base/solib-overlap.exp ...
sh: prelink: command not found
=== gdb Summary ===
nr of untested testcases 1
...
The verbose output on stdout/stderr is due to using system to execute
prelink, which also means that the output is not captured in gdb.log and
gdb.sum.
Fix this by using exec instead of system.
Tested on x86_64-linux, with:
- no prelink installed, and
- a fake prelink installed, using "cp /usr/bin/echo ~/bin/prelink".
gdb/testsuite/ChangeLog:
2020-02-19 Tom de Vries <tdevries@suse.de>
* gdb.base/solib-overlap.exp: Use exec instead of system to execute
prelink.
+2020-02-19 Tom de Vries <tdevries@suse.de>
+
+ * gdb.base/solib-overlap.exp: Use exec instead of system to execute
+ prelink.
+
2020-02-19 Tom de Vries <tdevries@suse.de>
* lib/cache.exp (ignore_pass, gdb_do_cache_wrap): New proc.
return -1
}
- if {[catch "system \"prelink -N -r ${prelink_lib1} ${binfile_lib1}\""] != 0
- || [catch "system \"prelink -N -r ${prelink_lib2} ${binfile_lib2}\""] != 0} {
+ if {[catch "exec prelink -N -r ${prelink_lib1} ${binfile_lib1}" output] != 0
+ || [catch "exec prelink -N -r ${prelink_lib2} ${binfile_lib2}" output] != 0} {
# Maybe we don't have prelink.
+ verbose -log "prelink failed: $output"
untested "could not prelink ${binfile_lib1_test_msg} or ${binfile_lib2_test_msg}."
return -1
}