public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [patch 5/6] testsuite: Fix prelink-support.exp without prelink  installed
@ 2010-03-29 16:18 Jan Kratochvil
  2010-06-09 15:10 ` ping: " Jan Kratochvil
  0 siblings, 1 reply; 11+ messages in thread
From: Jan Kratochvil @ 2010-03-29 16:18 UTC (permalink / raw)
  To: gdb-patches

Hi,

originally posted as:
	Re: [patch] testsuite: Fix break-interp.exp without prelink installed #2
	http://sourceware.org/ml/gdb-patches/2010-03/msg00912.html

Rediffed only (+that new one return).

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

Found now in a virtual machine that if you have no /usr/sbin/prelink testsuite
produces:

FAIL: gdb.base/break-interp.exp: LDprelinkNOdebugNO: unprelink break-interp-LDprelinkNOdebugNO
...
# of expected passes		10
# of unexpected failures	6


Fixed it, it runs at least the parts it can + XFAILs the others.


/usr/sbin/prelink installed:
# of expected passes            1580

/usr/sbin/prelink not installed, no system libraries prelinked:
# of expected passes            579
# of expected failures          12
XFAIL: gdb.base/break-interp.exp: LDprelinkNOdebugNO: BINprelinkYESdebugNOpieYES: prelink break-interp-BINprelinkYESdebugNOpieYES (missing /usr/sbin/prelink)

/usr/sbin/prelink not installed but some system libraries prelinked - this
should not normally happen:
# of expected passes            12
# of unexpected failures        5
# of expected failures          1
FAIL: gdb.base/break-interp.exp: LDprelinkNOdebugNO: unprelink break-interp-LDprelinkNOdebugNO (missing /usr/sbin/prelink) (/home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.base/break-interp-LDprelinkNOdebugNO is already prelinked)


No regressions on {x86_64,x86_64-m32,i686}-fedora12-linux-gnu for the whole
patch series together.


Thanks,
Jan


gdb/testsuite/
2010-03-29  Jan Kratochvil  <jan.kratochvil@redhat.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.

--- a/gdb/testsuite/lib/prelink-support.exp
+++ b/gdb/testsuite/lib/prelink-support.exp
@@ -168,6 +168,29 @@ proc prelink_no {arg {name {}}} {
     set result [catch $command output]
     verbose -log "result is $result"
     verbose -log "output is $output"
+    if {$result == 1 && [regexp {^(couldn't execute "/usr/sbin/prelink[^\r\n]*": no such file or directory\n?)*$} $output]} {
+	# Without prelink at lest verify all the binaries do not contain the
+	# ".gnu.prelink_undo" section so that they are not already prelinked.
+	set test "$test (missing /usr/sbin/prelink)"
+	foreach bin [split $arg] {
+	    if [string match "-*" $bin] {
+		# Skip prelink options.
+		continue
+	    }
+	    set readelf_program [transform readelf]
+	    set command "exec $readelf_program -WS $bin"
+	    verbose -log "command is $command"
+	    set result [catch $command output]
+	    verbose -log "result is $result"
+	    verbose -log "output is $output"
+	    if {$result != 0 || [string match {* .gnu.prelink_undo *} $output]} {
+		fail "$test ($bin is already prelinked)"
+		return 0
+	    }
+	}
+	pass $test
+	return 1
+    }
     if {$result == 0 && $output == ""} {
 	verbose -log "$name has been now unprelinked"
 	set command "exec /usr/sbin/prelink -uN $arg"
@@ -198,7 +221,9 @@ proc prelink_yes {arg {name ""}} {
     # Try to unprelink it first so that if it has been already prelinked before
     # we get different address now and the result is not affected by the
     # previous $arg state..
-    prelink_no $arg "$name pre-unprelink"
+    if ![prelink_no $arg "$name pre-unprelink"] {
+	return 0
+    }
 
     set test "prelink $name"
 
@@ -216,6 +241,14 @@ proc prelink_yes {arg {name ""}} {
     set result [catch $command output]
     verbose -log "result is $result"
     verbose -log "output is $output"
+    if {$result == 1 && [regexp {^(couldn't execute "/usr/sbin/prelink[^\r\n]*": no such file or directory\n?)*$} $output]} {
+	set test "$test (missing /usr/sbin/prelink)"
+	# 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.
+	xfail $test
+	return 0
+    }
     if {$result == 0 && $output == ""} {
 	pass $test
 	return 1

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

* ping: [patch 5/6] testsuite: Fix prelink-support.exp without prelink installed
  2010-03-29 16:18 [patch 5/6] testsuite: Fix prelink-support.exp without prelink installed Jan Kratochvil
@ 2010-06-09 15:10 ` Jan Kratochvil
  2010-06-29 22:09   ` Joel Brobecker
  0 siblings, 1 reply; 11+ messages in thread
From: Jan Kratochvil @ 2010-06-09 15:10 UTC (permalink / raw)
  To: gdb-patches

Hi,

originally posted as:
	[patch 5/6] testsuite: Fix prelink-support.exp without prelink installed
	http://sourceware.org/ml/gdb-patches/2010-03/msg01003.html

Rediffed only.

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

originally posted as:
	Re: [patch] testsuite: Fix break-interp.exp without prelink installed #2
	http://sourceware.org/ml/gdb-patches/2010-03/msg00912.html

Rediffed only (+that new one return).

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

Found now in a virtual machine that if you have no /usr/sbin/prelink testsuite
produces:

FAIL: gdb.base/break-interp.exp: LDprelinkNOdebugNO: unprelink break-interp-LDprelinkNOdebugNO
...
# of expected passes		10
# of unexpected failures	6


Fixed it, it runs at least the parts it can + XFAILs the others.


/usr/sbin/prelink installed:
# of expected passes            1580

/usr/sbin/prelink not installed, no system libraries prelinked:
# of expected passes            579
# of expected failures          12
XFAIL: gdb.base/break-interp.exp: LDprelinkNOdebugNO: BINprelinkYESdebugNOpieYES: prelink break-interp-BINprelinkYESdebugNOpieYES (missing /usr/sbin/prelink)

/usr/sbin/prelink not installed but some system libraries prelinked - this
should not normally happen:
# of expected passes            12
# of unexpected failures        5
# of expected failures          1
FAIL: gdb.base/break-interp.exp: LDprelinkNOdebugNO: unprelink break-interp-LDprelinkNOdebugNO (missing /usr/sbin/prelink) (/home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.base/break-interp-LDprelinkNOdebugNO is already prelinked)


No regressions on {x86_64,x86_64-m32,i686}-fedora12-linux-gnu for the whole
patch series together.


Thanks,
Jan


gdb/testsuite/
2010-03-29  Jan Kratochvil  <jan.kratochvil@redhat.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.

--- a/gdb/testsuite/lib/prelink-support.exp
+++ b/gdb/testsuite/lib/prelink-support.exp
@@ -168,6 +168,29 @@ proc prelink_no {arg {name {}}} {
     set result [catch $command output]
     verbose -log "result is $result"
     verbose -log "output is $output"
+    if {$result == 1 && [regexp {^(couldn't execute "/usr/sbin/prelink[^\r\n]*": no such file or directory\n?)*$} $output]} {
+	# Without prelink at lest verify all the binaries do not contain the
+	# ".gnu.prelink_undo" section so that they are not already prelinked.
+	set test "$test (missing /usr/sbin/prelink)"
+	foreach bin [split $arg] {
+	    if [string match "-*" $bin] {
+		# Skip prelink options.
+		continue
+	    }
+	    set readelf_program [transform readelf]
+	    set command "exec $readelf_program -WS $bin"
+	    verbose -log "command is $command"
+	    set result [catch $command output]
+	    verbose -log "result is $result"
+	    verbose -log "output is $output"
+	    if {$result != 0 || [string match {* .gnu.prelink_undo *} $output]} {
+		fail "$test ($bin is already prelinked)"
+		return 0
+	    }
+	}
+	pass $test
+	return 1
+    }
     if {$result == 0 && $output == ""} {
 	verbose -log "$name has been now unprelinked"
 	set command "exec /usr/sbin/prelink -uN $arg"
@@ -198,7 +221,9 @@ proc prelink_yes {arg {name ""}} {
     # Try to unprelink it first so that if it has been already prelinked before
     # we get different address now and the result is not affected by the
     # previous $arg state..
-    prelink_no $arg "$name pre-unprelink"
+    if ![prelink_no $arg "$name pre-unprelink"] {
+	return 0
+    }
 
     set test "prelink $name"
 
@@ -216,6 +241,14 @@ proc prelink_yes {arg {name ""}} {
     set result [catch $command output]
     verbose -log "result is $result"
     verbose -log "output is $output"
+    if {$result == 1 && [regexp {^(couldn't execute "/usr/sbin/prelink[^\r\n]*": no such file or directory\n?)*$} $output]} {
+	set test "$test (missing /usr/sbin/prelink)"
+	# 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.
+	xfail $test
+	return 0
+    }
     if {$result == 0 && $output == ""} {
 	pass $test
 	return 1

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

* Re: ping: [patch 5/6] testsuite: Fix prelink-support.exp without prelink installed
  2010-06-09 15:10 ` ping: " Jan Kratochvil
@ 2010-06-29 22:09   ` Joel Brobecker
  2010-07-04 10:19     ` Jan Kratochvil
  0 siblings, 1 reply; 11+ messages in thread
From: Joel Brobecker @ 2010-06-29 22:09 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: gdb-patches

> gdb/testsuite/
> 2010-03-29  Jan Kratochvil  <jan.kratochvil@redhat.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.

-- 
Joel

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

* Re: ping: [patch 5/6] testsuite: Fix prelink-support.exp without prelink installed
  2010-06-29 22:09   ` Joel Brobecker
@ 2010-07-04 10:19     ` Jan Kratochvil
  2010-07-05 17:40       ` Joel Brobecker
  2010-07-19 15:06       ` Pedro Alves
  0 siblings, 2 replies; 11+ messages in thread
From: Jan Kratochvil @ 2010-07-04 10:19 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: gdb-patches

On Wed, 30 Jun 2010 00:09:04 +0200, Joel Brobecker wrote:
> 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?

GDB testsuite does not force English, neither dejagnu.  But TCL seems to
ignore locale:
$ LANG=cs_CZ LC_ALL=cs_CZ tclsh
% exec /foo
couldn't execute "/foo": no such file or directory

Which may match:
3/30/99 (bug fix) Tcl no longer calls setlocale().  It looks at
env(LANG) and env(LC_TYPE) instead.  (stanton)

And some tcl grepping of sources I have done now.  (tcl8.5.8-src.tar.gz)
        sprintf(errSpace, "%dcouldn't execute \"%.150s\": ", errno, argv[0]);
 - no _() / gettext() there.


> 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?

There is explicitly executed /usr/sbin/prelink because on some systems
/usr/sbin is not in the default non-root $PATH.  This also fixes:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=225783
http://cvs.fedoraproject.org/viewvc/rpms/gdb/F-13/gdb-6.6-bz225783-prelink-path.patch?content-type=text%2Fplain&view=co
= gdb.base/prelink.exp: prelink -> /usr/sbin/prelink

It is true I did not ask if it is cross-OS compatible enough (Debian is OK).


Do you suggest /usr/sbin/prelink existence check, $PATH search (with
explicitly appended `/usr/sbin') or the current error message check?


Thanks,
Jan


gdb/testsuite/
2010-07-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
	    Joel Brobecker  <brobecker@adacore.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.

--- a/gdb/testsuite/lib/prelink-support.exp
+++ b/gdb/testsuite/lib/prelink-support.exp
@@ -187,6 +187,30 @@ proc prelink_no {arg {name {}}} {
     set result [catch $command output]
     verbose -log "result is $result"
     verbose -log "output is $output"
+    if {$result == 1 && [regexp {^(couldn't execute "/usr/sbin/prelink[^\r\n]*": no such file or directory\n?)*$} $output]} {
+	# Without prelink, at least verify that all the binaries do not
+	# contain the  ".gnu.prelink_undo" section (which would mean that they
+	# have already been prelinked).
+	set test "$test (missing /usr/sbin/prelink)"
+	foreach bin [split $arg] {
+	    if [string match "-*" $bin] {
+		# Skip prelink options.
+		continue
+	    }
+	    set readelf_program [transform readelf]
+	    set command "exec $readelf_program -WS $bin"
+	    verbose -log "command is $command"
+	    set result [catch $command output]
+	    verbose -log "result is $result"
+	    verbose -log "output is $output"
+	    if {$result != 0 || [string match {* .gnu.prelink_undo *} $output]} {
+		fail "$test ($bin is already prelinked)"
+		return 0
+	    }
+	}
+	pass $test
+	return 1
+    }
     if {$result == 0 && $output == ""} {
 	verbose -log "$name has been now unprelinked"
 	set command "exec /usr/sbin/prelink -uN $arg"
@@ -217,7 +241,9 @@ proc prelink_yes {arg {name ""}} {
     # Try to unprelink it first so that, if it has been already prelinked
     # before, we get a different address now, making the new result unaffected
     # by any previous prelinking.
-    prelink_no $arg "$name pre-unprelink"
+    if ![prelink_no $arg "$name pre-unprelink"] {
+	return 0
+    }
 
     set test "prelink $name"
 
@@ -239,6 +265,19 @@ proc prelink_yes {arg {name ""}} {
     set result [catch $command output]
     verbose -log "result is $result"
     verbose -log "output is $output"
+    if {$result == 1 && [regexp {^(couldn't execute "/usr/sbin/prelink[^\r\n]*": no such file or directory\n?)*$} $output]} {
+	set test "$test (missing /usr/sbin/prelink)"
+
+	# 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.
+
+	xfail $test
+	return 0
+    }
     if {$result == 0 && $output == ""} {
 	pass $test
 	return 1

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

* Re: ping: [patch 5/6] testsuite: Fix prelink-support.exp without prelink installed
  2010-07-04 10:19     ` Jan Kratochvil
@ 2010-07-05 17:40       ` Joel Brobecker
  2010-07-05 18:13         ` Jan Kratochvil
  2010-07-19 15:06       ` Pedro Alves
  1 sibling, 1 reply; 11+ messages in thread
From: Joel Brobecker @ 2010-07-05 17:40 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: gdb-patches

> GDB testsuite does not force English, neither dejagnu.  But TCL seems to
> ignore locale:

That's more than good enough for me. Thanks!

> There is explicitly executed /usr/sbin/prelink because on some systems
> /usr/sbin is not in the default non-root $PATH.  This also fixes:

Good point.

> Do you suggest /usr/sbin/prelink existence check, $PATH search (with
> explicitly appended `/usr/sbin') or the current error message check?

I think it's fine to wait until we actually find a system where the
current approach is not working. So:

> gdb/testsuite/
> 2010-07-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
> 	    Joel Brobecker  <brobecker@adacore.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.

OK to commit.

-- 
Joel

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

* Re: ping: [patch 5/6] testsuite: Fix prelink-support.exp without prelink installed
  2010-07-05 17:40       ` Joel Brobecker
@ 2010-07-05 18:13         ` Jan Kratochvil
  0 siblings, 0 replies; 11+ messages in thread
From: Jan Kratochvil @ 2010-07-05 18:13 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: gdb-patches

On Mon, 05 Jul 2010 19:40:15 +0200, Joel Brobecker wrote:
> > Do you suggest /usr/sbin/prelink existence check, $PATH search (with
> > explicitly appended `/usr/sbin') or the current error message check?
> 
> I think it's fine to wait until we actually find a system where the
> current approach is not working. So:

OK...


> OK to commit.

Checked-in.


Thanks,
Jan


http://sourceware.org/ml/gdb-cvs/2010-07/msg00028.html

--- src/gdb/testsuite/ChangeLog	2010/07/05 18:01:53	1.2374
+++ src/gdb/testsuite/ChangeLog	2010/07/05 18:02:56	1.2375
@@ -1,6 +1,14 @@
 2010-07-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
 	    Joel Brobecker  <brobecker@adacore.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.
+
+2010-07-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
+	    Joel Brobecker  <brobecker@adacore.com>
+
 	* gdb.base/attach-pie-misread.exp: Load prelink-support.exp.  Replace
 	build_executable by build_executable_own_libs.  Replace "prelink -R"
 	execution by a call of prelink_yes.  Comment why "prelink -r" needs no
--- src/gdb/testsuite/lib/prelink-support.exp	2010/07/05 18:01:53	1.1
+++ src/gdb/testsuite/lib/prelink-support.exp	2010/07/05 18:02:56	1.2
@@ -187,6 +187,30 @@
     set result [catch $command output]
     verbose -log "result is $result"
     verbose -log "output is $output"
+    if {$result == 1 && [regexp {^(couldn't execute "/usr/sbin/prelink[^\r\n]*": no such file or directory\n?)*$} $output]} {
+	# Without prelink, at least verify that all the binaries do not
+	# contain the  ".gnu.prelink_undo" section (which would mean that they
+	# have already been prelinked).
+	set test "$test (missing /usr/sbin/prelink)"
+	foreach bin [split $arg] {
+	    if [string match "-*" $bin] {
+		# Skip prelink options.
+		continue
+	    }
+	    set readelf_program [transform readelf]
+	    set command "exec $readelf_program -WS $bin"
+	    verbose -log "command is $command"
+	    set result [catch $command output]
+	    verbose -log "result is $result"
+	    verbose -log "output is $output"
+	    if {$result != 0 || [string match {* .gnu.prelink_undo *} $output]} {
+		fail "$test ($bin is already prelinked)"
+		return 0
+	    }
+	}
+	pass $test
+	return 1
+    }
     if {$result == 0 && $output == ""} {
 	verbose -log "$name has been now unprelinked"
 	set command "exec /usr/sbin/prelink -uN $arg"
@@ -217,7 +241,9 @@
     # Try to unprelink it first so that, if it has been already prelinked
     # before, we get a different address now, making the new result unaffected
     # by any previous prelinking.
-    prelink_no $arg "$name pre-unprelink"
+    if ![prelink_no $arg "$name pre-unprelink"] {
+	return 0
+    }
 
     set test "prelink $name"
 
@@ -239,6 +265,19 @@
     set result [catch $command output]
     verbose -log "result is $result"
     verbose -log "output is $output"
+    if {$result == 1 && [regexp {^(couldn't execute "/usr/sbin/prelink[^\r\n]*": no such file or directory\n?)*$} $output]} {
+	set test "$test (missing /usr/sbin/prelink)"
+
+	# 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.
+
+	xfail $test
+	return 0
+    }
     if {$result == 0 && $output == ""} {
 	pass $test
 	return 1

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

* Re: ping: [patch 5/6] testsuite: Fix prelink-support.exp without prelink installed
  2010-07-04 10:19     ` Jan Kratochvil
  2010-07-05 17:40       ` Joel Brobecker
@ 2010-07-19 15:06       ` Pedro Alves
  2010-07-19 15:43         ` Daniel Jacobowitz
  1 sibling, 1 reply; 11+ messages in thread
From: Pedro Alves @ 2010-07-19 15:06 UTC (permalink / raw)
  To: gdb-patches; +Cc: Jan Kratochvil, Joel Brobecker

On Sunday 04 July 2010 11:18:42, Jan Kratochvil wrote:
> On Wed, 30 Jun 2010 00:09:04 +0200, Joel Brobecker wrote:
> > 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?
> 
> GDB testsuite does not force English, neither dejagnu.  But TCL seems to
> ignore locale:
> $ LANG=cs_CZ LC_ALL=cs_CZ tclsh
> % exec /foo
> couldn't execute "/foo": no such file or directory
> 

[...]

On a related note: ubuntu/debian's system gdb includes some half cooked
up gdb translations; I often forget it, and since a newly built gdb picks
up the system .po's, the whole testsuite falls over, tripping on translated
strings not matching the expected output:

$ echo $LANG
pt_PT.UTF-8

$ make check
:
:
(gdb) file /home/pedro/gdb/baseline/build/gdb/testsuite/gdb.base/gcore
Lendo símbolos de /home/pedro/gdb/baseline/build/gdb/testsuite/gdb.base/gcore...concluído.
(gdb) ERROR: couldn't load /home/pedro/gdb/baseline/build/gdb/testsuite/gdb.base/gcore into /home/pedro/gdb/baseline/build/gdb/testsuite/../../gdb/gdb.
:
:

I then just remember to do "unset LANG", and rerun the testsuite,
though I think this should be handled by our testsuite automatically
somewhere.  How does gcc's testsuite handle this?
(Of course, people on other distros would see this as well if we
had "official" translations.)

-- 
Pedro Alves

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

* Re: ping: [patch 5/6] testsuite: Fix prelink-support.exp without prelink installed
  2010-07-19 15:06       ` Pedro Alves
@ 2010-07-19 15:43         ` Daniel Jacobowitz
  2010-07-28 14:26           ` Disable i18n when running the testsuite (Re: ping: [patch 5/6] testsuite: Fix prelink-support.exp without prelink installed) Pedro Alves
  0 siblings, 1 reply; 11+ messages in thread
From: Daniel Jacobowitz @ 2010-07-19 15:43 UTC (permalink / raw)
  To: Pedro Alves; +Cc: gdb-patches, Jan Kratochvil, Joel Brobecker

On Mon, Jul 19, 2010 at 04:06:29PM +0100, Pedro Alves wrote:
> On a related note: ubuntu/debian's system gdb includes some half cooked
> up gdb translations;

Just Ubunutu! :-)  I wasn't aware of these and they aren't in Debian.

> I then just remember to do "unset LANG", and rerun the testsuite,
> though I think this should be handled by our testsuite automatically
> somewhere.  How does gcc's testsuite handle this?

# We set LC_ALL and LANG to C so that we get the same error messages
as expected.
setenv LC_ALL C
setenv LANG C

-- 
Daniel Jacobowitz
CodeSourcery

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

* Disable i18n when running the testsuite (Re: ping: [patch 5/6] testsuite: Fix prelink-support.exp without prelink installed)
  2010-07-19 15:43         ` Daniel Jacobowitz
@ 2010-07-28 14:26           ` Pedro Alves
  2010-07-28 17:36             ` Joel Brobecker
  0 siblings, 1 reply; 11+ messages in thread
From: Pedro Alves @ 2010-07-28 14:26 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches, Jan Kratochvil, Joel Brobecker

On Monday 19 July 2010 16:43:26, Daniel Jacobowitz wrote:
> On Mon, Jul 19, 2010 at 04:06:29PM +0100, Pedro Alves wrote:

> > I then just remember to do "unset LANG", and rerun the testsuite,
> > though I think this should be handled by our testsuite automatically
> > somewhere.  How does gcc's testsuite handle this?
> 
> # We set LC_ALL and LANG to C so that we get the same error messages
> as expected.
> setenv LC_ALL C
> setenv LANG C

It happened again :-)  Might as well get it over with.  Thanks
for the pointer.  The patch below works for me.

-- 
Pedro Alves

2010-07-28  Pedro Alves  <pedro@codesourcery.com>

	* lib/gdb.exp (gdb_init): Set LC_ALL and LANG to C in the
	environment.

---
 gdb/testsuite/lib/gdb.exp |    5 +++++
 1 file changed, 5 insertions(+)

Index: src/gdb/testsuite/lib/gdb.exp
===================================================================
--- src.orig/gdb/testsuite/lib/gdb.exp	2010-07-28 14:21:47.000000000 +0100
+++ src/gdb/testsuite/lib/gdb.exp	2010-07-28 14:23:54.000000000 +0100
@@ -2687,6 +2687,11 @@ proc gdb_init { args } {
 	set banned_variables_traced 1
     }
 
+    # We set LC_ALL and LANG to C so that we get the same messages as
+    # expected.
+    setenv LC_ALL C
+    setenv LANG C
+
     return [eval default_gdb_init $args];
 }
 

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

* Re: Disable i18n when running the testsuite (Re: ping: [patch 5/6] testsuite: Fix prelink-support.exp without prelink installed)
  2010-07-28 14:26           ` Disable i18n when running the testsuite (Re: ping: [patch 5/6] testsuite: Fix prelink-support.exp without prelink installed) Pedro Alves
@ 2010-07-28 17:36             ` Joel Brobecker
  2010-07-29 14:20               ` Disable i18n when running the testsuite Pedro Alves
  0 siblings, 1 reply; 11+ messages in thread
From: Joel Brobecker @ 2010-07-28 17:36 UTC (permalink / raw)
  To: Pedro Alves; +Cc: Daniel Jacobowitz, gdb-patches, Jan Kratochvil

> 2010-07-28  Pedro Alves  <pedro@codesourcery.com>
> 
> 	* lib/gdb.exp (gdb_init): Set LC_ALL and LANG to C in the
> 	environment.

Something like that is necessary, I agree.

I just found out that dejagnu provides a set of interesting procedures
(including setenv/unsetenv), such as grep, which, etc...

-- 
Joel

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

* Re: Disable i18n when running the testsuite
  2010-07-28 17:36             ` Joel Brobecker
@ 2010-07-29 14:20               ` Pedro Alves
  0 siblings, 0 replies; 11+ messages in thread
From: Pedro Alves @ 2010-07-29 14:20 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: Daniel Jacobowitz, gdb-patches, Jan Kratochvil

On Wednesday 28 July 2010 18:35:36, Joel Brobecker wrote:
> > 2010-07-28  Pedro Alves  <pedro@codesourcery.com>
> > 
> >       * lib/gdb.exp (gdb_init): Set LC_ALL and LANG to C in the
> >       environment.
> 
> Something like that is necessary, I agree.

I've applied it.

-- 
Pedro Alves

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

end of thread, other threads:[~2010-07-29 14:20 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-29 16:18 [patch 5/6] testsuite: Fix prelink-support.exp without prelink installed Jan Kratochvil
2010-06-09 15:10 ` ping: " Jan Kratochvil
2010-06-29 22:09   ` Joel Brobecker
2010-07-04 10:19     ` Jan Kratochvil
2010-07-05 17:40       ` Joel Brobecker
2010-07-05 18:13         ` Jan Kratochvil
2010-07-19 15:06       ` Pedro Alves
2010-07-19 15:43         ` Daniel Jacobowitz
2010-07-28 14:26           ` Disable i18n when running the testsuite (Re: ping: [patch 5/6] testsuite: Fix prelink-support.exp without prelink installed) Pedro Alves
2010-07-28 17:36             ` Joel Brobecker
2010-07-29 14:20               ` Disable i18n when running the testsuite Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).