This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch or FYI] testsuite: Fix prelink.exp on $PATH without /usr/sbin


Hi,

this patch is in fact superseded by pending:
        [patch 4/6] testsuite: Unify to lib/prelink-support.exp
        http://sourceware.org/ml/gdb-patches/2010-03/msg01002.html
as lib/prelink-support.exp comes from already checked-in
gdb.base/break-interp.exp which is already using "/usr/sbin/prelink".

I prefer the [patch 4/6] over this patch but this mail can serve also as an
illustration of the current problem.

------------------------------------------------------------------------------

Some systems do not have /usr/sbin in $PATH and prelink.exp is needlessly
UNRESOLVED there.

The question is whether all the systems really have /usr/sbin/prelink on this
place.  Upstream uses Makefile.am with:
sbin_PROGRAMS = prelink

Checked that both Fedora and Debian use /usr/sbin/prelink.  If it can be
somewhere else than /usr/sbin/prelink I would need to change already checked-in
`gdb.base/break-interp.exp' now referencing /usr/sbin/prelink.

One can Google out "/usr/bin/prelink" references on Debian but it seems to me
this is a mail typo as I have not found it there at that location.

Tested on x86_64-fedora12-linux-gnu.


Thanks,
Jan


gdb/testsuite/
2007-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>

	Fix testcase on systems without "/usr/sbin" in $PATH.
	* gdb.base/prelink.exp: Use absolute "/usr/sbin/prelink" pathname.

--- gdb-6.8/gdb/testsuite/gdb.base/prelink.exp.orig	2008-07-12 08:56:43.000000000 +0200
+++ gdb-6.8/gdb/testsuite/gdb.base/prelink.exp	2008-07-12 08:59:59.000000000 +0200
@@ -55,7 +55,7 @@ if { [gdb_compile "${srcdir}/${subdir}/$
 # single new unprelinked library address without wasting the first one/two
 # memory areas.  We do not care of the efficiency of loading such resulting
 # exec-shield unfriendly prelinked library.
-if {[catch "system \"prelink -qNR --no-exec-shield ${libfile}\""] != 0} {
+if {[catch "system \"/usr/sbin/prelink -qNR --no-exec-shield ${libfile}\""] != 0} {
     # Maybe we don't have prelink.
     return -1
 }
@@ -96,11 +96,11 @@ if { $found == 0  } {
     return 0
 }
 
-if {[catch "system \"prelink -uN ${libfile}\""] != 0} {
+if {[catch "system \"/usr/sbin/prelink -uN ${libfile}\""] != 0} {
     untested "${testfile}.so was not prelinked, maybe system libraries are not prelinked?"
     return 0
 }
-catch "system \"prelink -qNR --no-exec-shield ${libfile}\""
+catch "system \"/usr/sbin/prelink -qNR --no-exec-shield ${libfile}\""
 
 # Start with a fresh gdb
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]