diff options
author | Tom de Vries <tdevries@suse.de> | 2020-02-19 08:24:44 +0100 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2020-02-19 08:24:44 +0100 |
commit | 86cbc5dc163fb8f0927b82d5f0e3809a3820389b (patch) | |
tree | 2f90973a31919d79b8b3b9e0614b52c357bc46df | |
parent | 9db2b96b0759fda3347743caba66a395d115e335 (diff) | |
download | gdb-86cbc5dc163fb8f0927b82d5f0e3809a3820389b.zip gdb-86cbc5dc163fb8f0927b82d5f0e3809a3820389b.tar.gz gdb-86cbc5dc163fb8f0927b82d5f0e3809a3820389b.tar.bz2 |
[gdb/testsuite] Be quiet about missing prelink in solib-overlap.exp
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.
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/solib-overlap.exp | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 8978617..49b0aff 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,10 @@ 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. (gdb_do_cache): Use gdb_do_cache_wrap. * gdb.base/gdb-caching-proc.exp (test_proc): Use gdb_do_cache_wrap. diff --git a/gdb/testsuite/gdb.base/solib-overlap.exp b/gdb/testsuite/gdb.base/solib-overlap.exp index 661d6cf..a7064a1 100644 --- a/gdb/testsuite/gdb.base/solib-overlap.exp +++ b/gdb/testsuite/gdb.base/solib-overlap.exp @@ -74,9 +74,10 @@ foreach prelink_lib1 {0x40000000 0x50000000} { with_test_prefix "$prelink_lib1" 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 } |