Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [committed][gdb/testsuite] Be quiet about missing prelink in solib-overlap.exp
Date: Wed, 19 Feb 2020 07:26:00 -0000	[thread overview]
Message-ID: <20200219072603.GA2019@delia> (raw)

Hi,

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".


Committed to trunk.

Thanks,
- Tom

[gdb/testsuite] Be quiet about missing prelink in solib-overlap.exp

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.

---
 gdb/testsuite/gdb.base/solib-overlap.exp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gdb/testsuite/gdb.base/solib-overlap.exp b/gdb/testsuite/gdb.base/solib-overlap.exp
index 661d6cfa73..a7064a1316 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
     }


                 reply	other threads:[~2020-02-19  7:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200219072603.GA2019@delia \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox