Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch] Handle absent "/usr/sbin/" in prelink error output.
@ 2010-11-16 21:11 Doug Evans
  2010-11-16 21:23 ` Doug Evans
  0 siblings, 1 reply; 5+ messages in thread
From: Doug Evans @ 2010-11-16 21:11 UTC (permalink / raw)
  To: gdb-patches

Hi.

I'm seeing the following output from prelink:

prelink: /g3/gnu/sourceware/pretty-printers/build/obj64/gdb/testsuite/gdb.base/attach-pie-misread.d/ld-linux-x86-64.so.2 does not have .gnu.prelink_undo section

which causes attach-pie-misread.exp to fail with:

FAIL: gdb.base/attach-pie-misread.exp: unprelink ld-linux-x86-64.so.2 pre-unprelink

I will check in the following patch in two days if there are no objections.

2010-11-16  Doug Evans  <dje@google.com>

	* lib/prelink-support.exp (prelink_no): Handle absent "/usr/sbin/"
	in prelink error output.

Index: lib/prelink-support.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/prelink-support.exp,v
retrieving revision 1.3
diff -u -p -r1.3 prelink-support.exp
--- lib/prelink-support.exp	12 Oct 2010 18:12:49 -0000	1.3
+++ lib/prelink-support.exp	16 Nov 2010 21:06:58 -0000
@@ -221,7 +221,7 @@ proc prelink_no {arg {name {}}} {
     }
     # Last line does miss the trailing \n.  There can be multiple such messages
     # as ARG may list multiple files.
-    if {$result == 1 && [regexp {^(/usr/sbin/prelink[^\r\n]*: [^ ]* does not have .gnu.prelink_undo section\n?)*$} $output]} {
+    if {$result == 1 && [regexp {^((/usr/sbin/)?prelink[^\r\n]*: [^ ]* does not have .gnu.prelink_undo section\n?)*$} $output]} {
 	pass $test
 	return 1
     } else {


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch] Handle absent "/usr/sbin/" in prelink error output.
  2010-11-16 21:11 [patch] Handle absent "/usr/sbin/" in prelink error output Doug Evans
@ 2010-11-16 21:23 ` Doug Evans
  2010-11-16 22:36   ` Jan Kratochvil
  0 siblings, 1 reply; 5+ messages in thread
From: Doug Evans @ 2010-11-16 21:23 UTC (permalink / raw)
  To: gdb-patches

On Tue, Nov 16, 2010 at 1:11 PM, Doug Evans <dje@google.com> wrote:
> Hi.
>
> I'm seeing the following output from prelink:
>
> prelink: /g3/gnu/sourceware/pretty-printers/build/obj64/gdb/testsuite/gdb.base/attach-pie-misread.d/ld-linux-x86-64.so.2 does not have .gnu.prelink_undo section
>
> which causes attach-pie-misread.exp to fail with:
>
> FAIL: gdb.base/attach-pie-misread.exp: unprelink ld-linux-x86-64.so.2 pre-unprelink
>
> I will check in the following patch in two days if there are no objections.
>
> 2010-11-16  Doug Evans  <dje@google.com>
>
>        * lib/prelink-support.exp (prelink_no): Handle absent "/usr/sbin/"
>        in prelink error output.
>
> Index: lib/prelink-support.exp
> ===================================================================
> RCS file: /cvs/src/src/gdb/testsuite/lib/prelink-support.exp,v
> retrieving revision 1.3
> diff -u -p -r1.3 prelink-support.exp
> --- lib/prelink-support.exp     12 Oct 2010 18:12:49 -0000      1.3
> +++ lib/prelink-support.exp     16 Nov 2010 21:06:58 -0000
> @@ -221,7 +221,7 @@ proc prelink_no {arg {name {}}} {
>     }
>     # Last line does miss the trailing \n.  There can be multiple such messages
>     # as ARG may list multiple files.
> -    if {$result == 1 && [regexp {^(/usr/sbin/prelink[^\r\n]*: [^ ]* does not have .gnu.prelink_undo section\n?)*$} $output]} {
> +    if {$result == 1 && [regexp {^((/usr/sbin/)?prelink[^\r\n]*: [^ ]* does not have .gnu.prelink_undo section\n?)*$} $output]} {
>        pass $test
>        return 1
>     } else {
>

Well, this shouldn't have caused a regression, but break-interp.exp
breaks badly with it.
So there's a deeper bug here.  Blech.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch] Handle absent "/usr/sbin/" in prelink error output.
  2010-11-16 21:23 ` Doug Evans
@ 2010-11-16 22:36   ` Jan Kratochvil
  2010-11-16 22:44     ` Doug Evans
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Kratochvil @ 2010-11-16 22:36 UTC (permalink / raw)
  To: Doug Evans; +Cc: gdb-patches

On Tue, 16 Nov 2010 22:23:35 +0100, Doug Evans wrote:
> On Tue, Nov 16, 2010 at 1:11 PM, Doug Evans <dje@google.com> wrote:
> > --- lib/prelink-support.exp     12 Oct 2010 18:12:49 -0000      1.3
> > +++ lib/prelink-support.exp     16 Nov 2010 21:06:58 -0000
> > @@ -221,7 +221,7 @@ proc prelink_no {arg {name {}}} {
> >     }
> >     # Last line does miss the trailing \n.  There can be multiple such messages
> >     # as ARG may list multiple files.
> > -    if {$result == 1 && [regexp {^(/usr/sbin/prelink[^\r\n]*: [^ ]* does not have .gnu.prelink_undo section\n?)*$} $output]} {
> > +    if {$result == 1 && [regexp {^((/usr/sbin/)?prelink[^\r\n]*: [^ ]* does not have .gnu.prelink_undo section\n?)*$} $output]} {
> >        pass $test
> >        return 1
> >     } else {
> >
> 
> Well, this shouldn't have caused a regression, but break-interp.exp
> breaks badly with it.
> So there's a deeper bug here.  Blech.

I do not have any of the problems reproducible on Fedora 14 x86_64 (which is
understandable as the testcases were written on this platform).  I do not see
why your proposed patch should break anything.

But speaking specifically about gdb.base/attach-pie-misread.exp I am free to
drop it whole.  The problem is very difficult to reliably reproduce, various
memory alignments must match to make the former problem reproducible.


Thanks,
Jan


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch] Handle absent "/usr/sbin/" in prelink error output.
  2010-11-16 22:36   ` Jan Kratochvil
@ 2010-11-16 22:44     ` Doug Evans
  2010-11-16 22:58       ` Jan Kratochvil
  0 siblings, 1 reply; 5+ messages in thread
From: Doug Evans @ 2010-11-16 22:44 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: gdb-patches

On Tue, Nov 16, 2010 at 2:36 PM, Jan Kratochvil
<jan.kratochvil@redhat.com> wrote:
> On Tue, 16 Nov 2010 22:23:35 +0100, Doug Evans wrote:
>> On Tue, Nov 16, 2010 at 1:11 PM, Doug Evans <dje@google.com> wrote:
>> > --- lib/prelink-support.exp     12 Oct 2010 18:12:49 -0000      1.3
>> > +++ lib/prelink-support.exp     16 Nov 2010 21:06:58 -0000
>> > @@ -221,7 +221,7 @@ proc prelink_no {arg {name {}}} {
>> >     }
>> >     # Last line does miss the trailing \n.  There can be multiple such messages
>> >     # as ARG may list multiple files.
>> > -    if {$result == 1 && [regexp {^(/usr/sbin/prelink[^\r\n]*: [^ ]* does not have .gnu.prelink_undo section\n?)*$} $output]} {
>> > +    if {$result == 1 && [regexp {^((/usr/sbin/)?prelink[^\r\n]*: [^ ]* does not have .gnu.prelink_undo section\n?)*$} $output]} {
>> >        pass $test
>> >        return 1
>> >     } else {
>> >
>>
>> Well, this shouldn't have caused a regression, but break-interp.exp
>> breaks badly with it.
>> So there's a deeper bug here.  Blech.
>
> I do not have any of the problems reproducible on Fedora 14 x86_64 (which is
> understandable as the testcases were written on this platform).  I do not see
> why your proposed patch should break anything.
>
> But speaking specifically about gdb.base/attach-pie-misread.exp I am free to
> drop it whole.  The problem is very difficult to reliably reproduce, various
> memory alignments must match to make the former problem reproducible.

Thanks for the offer to delete attach-pie-misread.exp.
I wouldn't delete it just yet, as I also have four failures in
break-interp.exp to fix too.  They're fixed with the above patch, but
then many more failures are introduced.

I'm wondering if at least part of the problem is in prelink_{no,yes}.
Is it possible for them to return zero (i.e. "fail") but not trigger a
test failure?  e.g. is there a conflation of "feature is present but
not working" with "feature is not present"?  Dunno, just a wild guess
at this point.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch] Handle absent "/usr/sbin/" in prelink error output.
  2010-11-16 22:44     ` Doug Evans
@ 2010-11-16 22:58       ` Jan Kratochvil
  0 siblings, 0 replies; 5+ messages in thread
From: Jan Kratochvil @ 2010-11-16 22:58 UTC (permalink / raw)
  To: Doug Evans; +Cc: gdb-patches

On Tue, 16 Nov 2010 23:44:33 +0100, Doug Evans wrote:
> I'm wondering if at least part of the problem is in prelink_{no,yes}.
> Is it possible for them to return zero (i.e. "fail") but not trigger a
> test failure?  e.g. is there a conflation of "feature is present but
> not working" with "feature is not present"?  Dunno, just a wild guess
> at this point.

prelink_{no,yes} are pretty short and they only:
return 0 => then fail or xfail has been always executed
return 1 => then pass has been always executed


Regards,
Jan


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-11-16 22:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-16 21:11 [patch] Handle absent "/usr/sbin/" in prelink error output Doug Evans
2010-11-16 21:23 ` Doug Evans
2010-11-16 22:36   ` Jan Kratochvil
2010-11-16 22:44     ` Doug Evans
2010-11-16 22:58       ` Jan Kratochvil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox