This is the mail archive of the
mailing list for the GDB project.
Re: ping: [patch 5/6] testsuite: Fix prelink-support.exp without prelink installed
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 29 Jun 2010 15:09:04 -0700
- Subject: Re: ping: [patch 5/6] testsuite: Fix prelink-support.exp without prelink installed
- References: <20100329161831.GD2940@host0.dyn.jankratochvil.net> <20100609150954.GE7183@host0.dyn.jankratochvil.net>
> 2010-03-29 Jan Kratochvil <email@example.com>
> Cope with missing /usr/sbin/prelink.
> * lib/prelink-support.exp (prelink_no):
> <result == 1 && $output is "no such file or directory">: New.
> (prelink_yes): Likewise. Return on failed prelink_no.
This should be OK. I'm just concerned about matching the output
from the prelink command, since it is assuming that it is going to
be in English. Do you know if we force the language in the testsuite?
I'm just wondering whether a more straightforward/brutal approach might
be simpler and as effective: What if we searched for prelink in the PATH
and skipped the entire test if not found?
> + # Without prelink at lest verify all the binaries do not contain the
> + # ".gnu.prelink_undo" section so that they are not already prelinked.
Missing comma, and spell-o:
# Without prelink, at le*a*st verify *that* all the binaries do not
# contain the ".gnu.prelink_undo" section (which would mean that they
# have already been prelinked).
> + # While we could check if $arg is already prelinked (as if someone
> + # uninstalls prelink after having the system ld.so prelinked) we cannot
> + # change its prelinked address. Therefore rather skip the test.
I'm not a big fan of "as if [...]" in the case of documentation. It's OK
when spoken, but it's a little too subtle for written documentation.
I suggest something plainer:
# We could not find prelink. We could check whether $args is already
# prelinked but we don't, because:
# - It is unlikely that someone uninstalls prelink after having
# prelinked the system ld.so;
# - We still cannot change its prelinked address.
# Therefore, we just skip the test.