* Re: ☠ Buildbot (GNU Toolchain): binutils-gdb - failed test (failure) (master)
[not found] <20221019073533.3F8543858D3C@sourceware.org>
@ 2022-10-19 7:55 ` Tom de Vries
2022-10-19 9:02 ` Alan Modra
0 siblings, 1 reply; 3+ messages in thread
From: Tom de Vries @ 2022-10-19 7:55 UTC (permalink / raw)
To: rupesh potharla; +Cc: Binutils
On 10/19/22 09:35, builder@sourceware.org wrote:
> A new failure has been detected on builder binutils-debian-ppc64 while building binutils-gdb.
>
> Full details are available at:
> https://builder.sourceware.org/buildbot/#builders/78/builds/804
>
> Build state: failed test (failure)
> Revision: 740a19d914a83423122fe81eec9508fa1dbb0559
> Worker: debian-ppc64
> Build Reason: (unknown)
> Blamelist: Tom de Vries <tdevries@suse.de>, rupesh potharla <rupesh.potharla@amd.com>
>
Hi,
looks like this:
...
regexp -line {^([0-9a-fA-F]+)?[ ]+T main} $output contents
set list [regexp -inline -all -- {\S+} $contents]
...
is causing:
...
ERROR: tcl error sourcing
/var/lib/buildbot/workers/wildebeest/binutils-debian-ppc64/binutils-gdb/binutils/testsuite/binutils-all/addr2line.exp.
ERROR: tcl error code TCL LOOKUP VARNAME contents
ERROR: can't read "contents": no such variable
while executing
"regexp -inline -all -- {\S+} $contents"
(file
"/var/lib/buildbot/workers/wildebeest/binutils-debian-ppc64/binutils-gdb/binutils/testsuite/binutils-all/addr2line.exp"
line 31)
invoked from within
...
If the regexp doesn't match, contents is not set.
Thanks,
- Tom
> Steps:
>
> - 0: worker_preparation ( success )
>
> - 1: git checkout ( success )
> Logs:
> - stdio: https://builder.sourceware.org/buildbot/#builders/78/builds/804/steps/1/logs/stdio
>
> - 2: rm -rf binutils-build ( success )
> Logs:
> - stdio: https://builder.sourceware.org/buildbot/#builders/78/builds/804/steps/2/logs/stdio
>
> - 3: configure ( success )
> Logs:
> - stdio: https://builder.sourceware.org/buildbot/#builders/78/builds/804/steps/3/logs/stdio
>
> - 4: make ( warnings )
> Logs:
> - stdio: https://builder.sourceware.org/buildbot/#builders/78/builds/804/steps/4/logs/stdio
> - warnings (21): https://builder.sourceware.org/buildbot/#builders/78/builds/804/steps/4/logs/warnings__21_
>
> - 5: make check ( failure )
> Logs:
> - stdio: https://builder.sourceware.org/buildbot/#builders/78/builds/804/steps/5/logs/stdio
> - ld.sum: https://builder.sourceware.org/buildbot/#builders/78/builds/804/steps/5/logs/ld_sum
> - ld.log: https://builder.sourceware.org/buildbot/#builders/78/builds/804/steps/5/logs/ld_log
> - gas.sum: https://builder.sourceware.org/buildbot/#builders/78/builds/804/steps/5/logs/gas_sum
> - gas.log: https://builder.sourceware.org/buildbot/#builders/78/builds/804/steps/5/logs/gas_log
> - binutils.sum: https://builder.sourceware.org/buildbot/#builders/78/builds/804/steps/5/logs/binutils_sum
> - binutils.log: https://builder.sourceware.org/buildbot/#builders/78/builds/804/steps/5/logs/binutils_log
> - warnings (6): https://builder.sourceware.org/buildbot/#builders/78/builds/804/steps/5/logs/warnings__6_
>
> - 6: prep ( success )
> Logs:
> - stdio: https://builder.sourceware.org/buildbot/#builders/78/builds/804/steps/6/logs/stdio
>
> - 7: build bunsen.cpio.gz ( success )
> Logs:
> - stdio: https://builder.sourceware.org/buildbot/#builders/78/builds/804/steps/7/logs/stdio
>
> - 8: fetch bunsen.cpio.gz ( success )
> Logs:
> - stdio: https://builder.sourceware.org/buildbot/#builders/78/builds/804/steps/8/logs/stdio
>
> - 9: unpack bunsen.cpio.gz ( success )
> Logs:
> - stdio: https://builder.sourceware.org/buildbot/#builders/78/builds/804/steps/9/logs/stdio
>
> - 10: pass .bunsen.source.gitname ( success )
> Logs:
> - stdio: https://builder.sourceware.org/buildbot/#builders/78/builds/804/steps/10/logs/stdio
>
> - 11: pass .bunsen.source.gitdescribe ( success )
> Logs:
> - stdio: https://builder.sourceware.org/buildbot/#builders/78/builds/804/steps/11/logs/stdio
>
> - 12: pass .bunsen.source.gitbranch ( success )
> Logs:
> - stdio: https://builder.sourceware.org/buildbot/#builders/78/builds/804/steps/12/logs/stdio
>
> - 13: pass .bunsen.source.gitrepo ( success )
> Logs:
> - stdio: https://builder.sourceware.org/buildbot/#builders/78/builds/804/steps/13/logs/stdio
>
> - 14: upload to bunsen ( success )
> Logs:
> - stdio: https://builder.sourceware.org/buildbot/#builders/78/builds/804/steps/14/logs/stdio
>
> - 15: clean up ( success )
> Logs:
> - stdio: https://builder.sourceware.org/buildbot/#builders/78/builds/804/steps/15/logs/stdio
>
> - 16: rm -rf binutils-build_1 ( success )
> Logs:
> - stdio: https://builder.sourceware.org/buildbot/#builders/78/builds/804/steps/16/logs/stdio
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ☠ Buildbot (GNU Toolchain): binutils-gdb - failed test (failure) (master)
2022-10-19 7:55 ` ☠ Buildbot (GNU Toolchain): binutils-gdb - failed test (failure) (master) Tom de Vries
@ 2022-10-19 9:02 ` Alan Modra
2022-10-19 11:53 ` Fix addr2line test for ppc64 elfv1 and mingw Alan Modra
0 siblings, 1 reply; 3+ messages in thread
From: Alan Modra @ 2022-10-19 9:02 UTC (permalink / raw)
To: Tom de Vries; +Cc: rupesh potharla, Binutils
On Wed, Oct 19, 2022 at 09:55:59AM +0200, Tom de Vries via Binutils wrote:
> looks like this:
> ...
> regexp -line {^([0-9a-fA-F]+)?[ ]+T main} $output contents
> set list [regexp -inline -all -- {\S+} $contents]
> ...
> is causing:
> ...
> ERROR: tcl error sourcing /var/lib/buildbot/workers/wildebeest/binutils-debian-ppc64/binutils-gdb/binutils/testsuite/binutils-all/addr2line.exp.
> ERROR: tcl error code TCL LOOKUP VARNAME contents
> ERROR: can't read "contents": no such variable
> while executing
> "regexp -inline -all -- {\S+} $contents"
> (file "/var/lib/buildbot/workers/wildebeest/binutils-debian-ppc64/binutils-gdb/binutils/testsuite/binutils-all/addr2line.exp"
> line 31)
> invoked from within
> ...
>
> If the regexp doesn't match, contents is not set.
Right. It doesn't match for PowerPC64 ELFv1 because function symbols
are defined on a descriptor and are flagged as "D" not "T". The test
also fails on cygwin/mingw where the compiler output is testprog.exe.
I think the following will do the trick, I'll commit after a full
test run.
diff --git a/binutils/testsuite/binutils-all/addr2line.exp b/binutils/testsuite/binutils-all/addr2line.exp
index 15e60366ac2..c37b8b9cdc6 100644
--- a/binutils/testsuite/binutils-all/addr2line.exp
+++ b/binutils/testsuite/binutils-all/addr2line.exp
@@ -24,35 +24,43 @@ if { [target_compile $srcdir/$subdir/testprog.c tmpdir/testprog executable debug
return
}
+set exe [exeext]
+
#testcase for default option.
#Run nm command and input the main symbol address to addr2line.
-set output [binutils_run $NM "tmpdir/testprog"]
-regexp -line {^([0-9a-fA-F]+)?[ ]+T main} $output contents
-set list [regexp -inline -all -- {\S+} $contents]
-set got [binutils_run $ADDR2LINE "-e tmpdir/testprog [lindex $list 0]"]
-set want "$srcdir/$subdir/testprog.c:\[0-9\]+"
-if ![regexp $want $got] then {
- fail "$testname $got\n"
+set output [binutils_run $NM "tmpdir/testprog$exe"]
+if ![regexp -line {^([0-9a-fA-F]+)?[ ]+[TD] main} $output contents] then {
+ fail "$testname"
} else {
- pass "$testname"
+ set list [regexp -inline -all -- {\S+} $contents]
+ set got [binutils_run $ADDR2LINE "-e tmpdir/testprog$exe [lindex $list 0]"]
+ set want "$srcdir/$subdir/testprog.c:\[0-9\]+"
+ if ![regexp $want $got] then {
+ fail "$testname $got\n"
+ } else {
+ pass "$testname"
+ }
}
#testcase for -f option.
#Run nm command and input the fn function symbol address to addr2line.
-regexp -line {^([0-9a-fA-F]+)?[ ]+T fn} $output contents
-pass "output is $output \n contents is $contents\n"
-set list [regexp -inline -all -- {\S+} $contents]
-set got [binutils_run $ADDR2LINE "-f -e tmpdir/testprog [lindex $list 0]"]
-set want "fn\n$srcdir/$subdir/testprog.c:\[0-9\]+"
-if ![regexp $want $got] then {
- fail "$testname -f option $got\n"
+if ![regexp -line {^([0-9a-fA-F]+)?[ ]+[TD] fn} $output contents] then {
+ fail "$testname -f option"
} else {
- pass "$testname -f option"
+ pass "output is $output \n contents is $contents\n"
+ set list [regexp -inline -all -- {\S+} $contents]
+ set got [binutils_run $ADDR2LINE "-f -e tmpdir/testprog$exe [lindex $list 0]"]
+ set want "fn\n$srcdir/$subdir/testprog.c:\[0-9\]+"
+ if ![regexp $want $got] then {
+ fail "$testname -f option $got\n"
+ } else {
+ pass "$testname -f option"
+ }
}
#testcase for -s option.
#Using the same fn function address used in -f option.
-set got [binutils_run $ADDR2LINE "-s -e tmpdir/testprog [lindex $list 0]"]
+set got [binutils_run $ADDR2LINE "-s -e tmpdir/testprog$exe [lindex $list 0]"]
set want "testprog.c:\[0-9\]+"
if ![regexp $want $got] then {
fail "$testname -s option $got\n"
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 3+ messages in thread
* Fix addr2line test for ppc64 elfv1 and mingw
2022-10-19 9:02 ` Alan Modra
@ 2022-10-19 11:53 ` Alan Modra
0 siblings, 0 replies; 3+ messages in thread
From: Alan Modra @ 2022-10-19 11:53 UTC (permalink / raw)
To: Tom de Vries; +Cc: rupesh potharla, Binutils
On Wed, Oct 19, 2022 at 07:32:40PM +1030, Alan Modra wrote:
> On Wed, Oct 19, 2022 at 09:55:59AM +0200, Tom de Vries via Binutils wrote:
> > looks like this:
> > ...
> > regexp -line {^([0-9a-fA-F]+)?[ ]+T main} $output contents
> > set list [regexp -inline -all -- {\S+} $contents]
> > ...
> > is causing:
> > ...
> > ERROR: tcl error sourcing /var/lib/buildbot/workers/wildebeest/binutils-debian-ppc64/binutils-gdb/binutils/testsuite/binutils-all/addr2line.exp.
> > ERROR: tcl error code TCL LOOKUP VARNAME contents
> > ERROR: can't read "contents": no such variable
> > while executing
> > "regexp -inline -all -- {\S+} $contents"
> > (file "/var/lib/buildbot/workers/wildebeest/binutils-debian-ppc64/binutils-gdb/binutils/testsuite/binutils-all/addr2line.exp"
> > line 31)
> > invoked from within
> > ...
> >
> > If the regexp doesn't match, contents is not set.
>
> Right. It doesn't match for PowerPC64 ELFv1 because function symbols
> are defined on a descriptor and are flagged as "D" not "T". The test
> also fails on cygwin/mingw where the compiler output is testprog.exe.
>
> I think the following will do the trick, I'll commit after a full
> test run.
It needed a bit more work to make the test pass on powerpc64
* testsuite/binutils-all/addr2line.exp: Tidy. For powerpc64
arrange to pass --synthetic to nm, and extract .main and .fn
symbol address for addr2line test. Handle default executable
extension on cygwin/mingw compilers.
diff --git a/binutils/testsuite/binutils-all/addr2line.exp b/binutils/testsuite/binutils-all/addr2line.exp
index 15e60366ac2..66a2d5d32a0 100644
--- a/binutils/testsuite/binutils-all/addr2line.exp
+++ b/binutils/testsuite/binutils-all/addr2line.exp
@@ -14,48 +14,60 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
-global $NM
-global $ADDR2LINE
-
set testname "addr2line"
+set opts ""
+set dot ""
+set exe [exeext]
+
+# powerpc64 function symbols are on descriptors rather than code.
+if [istarget powerpc64-*-*] {
+ set opts --synthetic
+ set dot {\.}
+}
+
if { [target_compile $srcdir/$subdir/testprog.c tmpdir/testprog executable debug] != "" } {
verbose "Unable to compile test file."
- untested "addr2line"
+ untested "$testname"
return
}
#testcase for default option.
#Run nm command and input the main symbol address to addr2line.
-set output [binutils_run $NM "tmpdir/testprog"]
-regexp -line {^([0-9a-fA-F]+)?[ ]+T main} $output contents
-set list [regexp -inline -all -- {\S+} $contents]
-set got [binutils_run $ADDR2LINE "-e tmpdir/testprog [lindex $list 0]"]
-set want "$srcdir/$subdir/testprog.c:\[0-9\]+"
-if ![regexp $want $got] then {
- fail "$testname $got\n"
+set output [binutils_run $NM "$opts tmpdir/testprog$exe"]
+if ![regexp -line "^(\[0-9a-fA-F\]+)? +T ${dot}main" $output contents] then {
+ fail "$testname"
} else {
- pass "$testname"
+ set list [regexp -inline -all -- {\S+} $contents]
+ set got [binutils_run $ADDR2LINE "-e tmpdir/testprog$exe [lindex $list 0]"]
+ set want "$srcdir/$subdir/testprog.c:\[0-9\]+"
+ if ![regexp $want $got] then {
+ fail "$testname $got\n"
+ } else {
+ pass "$testname"
+ }
}
#testcase for -f option.
#Run nm command and input the fn function symbol address to addr2line.
-regexp -line {^([0-9a-fA-F]+)?[ ]+T fn} $output contents
-pass "output is $output \n contents is $contents\n"
-set list [regexp -inline -all -- {\S+} $contents]
-set got [binutils_run $ADDR2LINE "-f -e tmpdir/testprog [lindex $list 0]"]
-set want "fn\n$srcdir/$subdir/testprog.c:\[0-9\]+"
-if ![regexp $want $got] then {
- fail "$testname -f option $got\n"
+if ![regexp -line "^(\[0-9a-fA-F\]+)? +T ${dot}fn" $output contents] then {
+ fail "$testname -f option"
} else {
- pass "$testname -f option"
-}
+ set list [regexp -inline -all -- {\S+} $contents]
+ set got [binutils_run $ADDR2LINE "-f -e tmpdir/testprog$exe [lindex $list 0]"]
+ set want "fn\n$srcdir/$subdir/testprog.c:\[0-9\]+"
+ if ![regexp $want $got] then {
+ fail "$testname -f option $got\n"
+ } else {
+ pass "$testname -f option"
+ }
#testcase for -s option.
#Using the same fn function address used in -f option.
-set got [binutils_run $ADDR2LINE "-s -e tmpdir/testprog [lindex $list 0]"]
-set want "testprog.c:\[0-9\]+"
-if ![regexp $want $got] then {
- fail "$testname -s option $got\n"
-} else {
- pass "$testname -s option"
+ set got [binutils_run $ADDR2LINE "-s -e tmpdir/testprog$exe [lindex $list 0]"]
+ set want "testprog.c:\[0-9\]+"
+ if ![regexp $want $got] then {
+ fail "$testname -s option $got\n"
+ } else {
+ pass "$testname -s option"
+ }
}
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-10-19 11:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20221019073533.3F8543858D3C@sourceware.org>
2022-10-19 7:55 ` ☠ Buildbot (GNU Toolchain): binutils-gdb - failed test (failure) (master) Tom de Vries
2022-10-19 9:02 ` Alan Modra
2022-10-19 11:53 ` Fix addr2line test for ppc64 elfv1 and mingw Alan Modra
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).