* [PATCH][gdb/testsuite] Be quiet about untested dtrace-prob.exp
@ 2020-02-18 12:02 Tom de Vries
2020-02-18 12:35 ` Luis Machado
2020-02-18 21:26 ` Tom Tromey
0 siblings, 2 replies; 6+ messages in thread
From: Tom de Vries @ 2020-02-18 12:02 UTC (permalink / raw)
To: gdb-patches
Hi,
When running gdb.base/dtrace-probe.exp, I get this on stdout/stderr:
...
Running src/gdb/testsuite/gdb.base/dtrace-probe.exp ...
gdb compile failed, ld: error in \
build/gdb/testsuite/outputs/gdb.base/dtrace-probe/dtrace-probe.o\
(.eh_frame); no .eh_frame_hdr table will be created
ld: crt1.o: in function `_start':
start.S:110: undefined reference to `main'
ld: build/gdb/testsuite/outputs/gdb.base/dtrace-probe/dtrace-probe-p.o:\
(.SUNW_dof+0x88): undefined reference to `main'
ld: build/gdb/testsuite/outputs/gdb.base/dtrace-probe/dtrace-probe-p.o:\
(.SUNW_dof+0xb8): undefined reference to `main'
collect2: error: ld returned 1 exit status
=== gdb Summary ===
nr of untested testcases 1
...
There is no reason to be this verbose about the failure to compile.
Fix this by using quiet as additional option to gdb_compile in
dtrace_build_usdt_test_program. Note that the error message still occurs in
gdb.log.
Tested on x86_64-linux.
OK for trunk?
Thanks,
- Tom
[gdb/testsuite] Be quiet about untested dtrace-prob.exp
gdb/testsuite/ChangeLog:
2020-02-18 Tom de Vries <tdevries@suse.de>
* lib/dtrace.exp (dtrace_build_usdt_test_program): Use quiet as
gdb_compile option.
---
gdb/testsuite/lib/dtrace.exp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/gdb/testsuite/lib/dtrace.exp b/gdb/testsuite/lib/dtrace.exp
index 9aed481f32..8f861c9de4 100644
--- a/gdb/testsuite/lib/dtrace.exp
+++ b/gdb/testsuite/lib/dtrace.exp
@@ -52,7 +52,8 @@ proc dtrace_build_usdt_test_program {} {
}
# 2. Compile testprogram.c.
- set options [list debug additional_flags=-I[file dirname $out_header_file]]
+ set options [list debug quiet \
+ additional_flags=-I[file dirname $out_header_file]]
if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}.o" object ${options}] != ""} {
return -1
}
@@ -65,7 +66,8 @@ proc dtrace_build_usdt_test_program {} {
}
# 4. Link everything together to get the test program.
- if {[gdb_compile "${binfile}.o ${binfile}-p.o" ${binfile} executable {debug}] != ""} {
+ if {[gdb_compile "${binfile}.o ${binfile}-p.o" ${binfile} executable \
+ {debug quiet}] != ""} {
return -1
}
}
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH][gdb/testsuite] Be quiet about untested dtrace-prob.exp
2020-02-18 12:02 [PATCH][gdb/testsuite] Be quiet about untested dtrace-prob.exp Tom de Vries
@ 2020-02-18 12:35 ` Luis Machado
2020-02-18 13:13 ` Tom de Vries
2020-02-18 21:26 ` Tom Tromey
1 sibling, 1 reply; 6+ messages in thread
From: Luis Machado @ 2020-02-18 12:35 UTC (permalink / raw)
To: Tom de Vries, gdb-patches
On 2/18/20 9:02 AM, Tom de Vries wrote:
> Hi,
>
> When running gdb.base/dtrace-probe.exp, I get this on stdout/stderr:
> ...
> Running src/gdb/testsuite/gdb.base/dtrace-probe.exp ...
> gdb compile failed, ld: error in \
> build/gdb/testsuite/outputs/gdb.base/dtrace-probe/dtrace-probe.o\
> (.eh_frame); no .eh_frame_hdr table will be created
> ld: crt1.o: in function `_start':
> start.S:110: undefined reference to `main'
> ld: build/gdb/testsuite/outputs/gdb.base/dtrace-probe/dtrace-probe-p.o:\
> (.SUNW_dof+0x88): undefined reference to `main'
> ld: build/gdb/testsuite/outputs/gdb.base/dtrace-probe/dtrace-probe-p.o:\
> (.SUNW_dof+0xb8): undefined reference to `main'
> collect2: error: ld returned 1 exit status
>
> === gdb Summary ===
>
> nr of untested testcases 1
Odd. I'm running this natively on aarch64 and i don't see the same. I
only get output in gdb.log.
> ...
>
> There is no reason to be this verbose about the failure to compile.
>
> Fix this by using quiet as additional option to gdb_compile in
> dtrace_build_usdt_test_program. Note that the error message still occurs in
> gdb.log.
>
> Tested on x86_64-linux.
>
> OK for trunk?
>
> Thanks,
> - Tom
>
> [gdb/testsuite] Be quiet about untested dtrace-prob.exp
>
> gdb/testsuite/ChangeLog:
>
> 2020-02-18 Tom de Vries <tdevries@suse.de>
>
> * lib/dtrace.exp (dtrace_build_usdt_test_program): Use quiet as
> gdb_compile option.
>
> ---
> gdb/testsuite/lib/dtrace.exp | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/gdb/testsuite/lib/dtrace.exp b/gdb/testsuite/lib/dtrace.exp
> index 9aed481f32..8f861c9de4 100644
> --- a/gdb/testsuite/lib/dtrace.exp
> +++ b/gdb/testsuite/lib/dtrace.exp
> @@ -52,7 +52,8 @@ proc dtrace_build_usdt_test_program {} {
> }
>
> # 2. Compile testprogram.c.
> - set options [list debug additional_flags=-I[file dirname $out_header_file]]
> + set options [list debug quiet \
> + additional_flags=-I[file dirname $out_header_file]]
> if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}.o" object ${options}] != ""} {
> return -1
> }
> @@ -65,7 +66,8 @@ proc dtrace_build_usdt_test_program {} {
> }
>
> # 4. Link everything together to get the test program.
> - if {[gdb_compile "${binfile}.o ${binfile}-p.o" ${binfile} executable {debug}] != ""} {
> + if {[gdb_compile "${binfile}.o ${binfile}-p.o" ${binfile} executable \
> + {debug quiet}] != ""} {
> return -1
> }
> }
>
Then again, it wouldn't hurt to prevent noisy output. So, this LGTM.
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH][gdb/testsuite] Be quiet about untested dtrace-prob.exp
2020-02-18 12:35 ` Luis Machado
@ 2020-02-18 13:13 ` Tom de Vries
2020-02-18 13:20 ` Luis Machado
0 siblings, 1 reply; 6+ messages in thread
From: Tom de Vries @ 2020-02-18 13:13 UTC (permalink / raw)
To: Luis Machado, gdb-patches
On 18-02-2020 13:35, Luis Machado wrote:
> On 2/18/20 9:02 AM, Tom de Vries wrote:
>> Hi,
>>
>> When running gdb.base/dtrace-probe.exp, I get this on stdout/stderr:
>> ...
>> Running src/gdb/testsuite/gdb.base/dtrace-probe.exp ...
>> gdb compile failed, ld: error in \
>> Â Â build/gdb/testsuite/outputs/gdb.base/dtrace-probe/dtrace-probe.o\
>> Â Â (.eh_frame); no .eh_frame_hdr table will be created
>> ld: crt1.o: in function `_start':
>> start.S:110: undefined reference to `main'
>> ld: build/gdb/testsuite/outputs/gdb.base/dtrace-probe/dtrace-probe-p.o:\
>> Â Â (.SUNW_dof+0x88): undefined reference to `main'
>> ld: build/gdb/testsuite/outputs/gdb.base/dtrace-probe/dtrace-probe-p.o:\
>> Â Â (.SUNW_dof+0xb8): undefined reference to `main'
>> collect2: error: ld returned 1 exit status
>>
>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â === gdb Summary ===
>>
>> nr of untested testcases        1
>
> Odd. I'm running this natively on aarch64 and i don't see the same. I
> only get output in gdb.log.
>
I've looked a bit at the semantics of output_clone (in
/usr/share/dejagnu/framework.exp), and the only way I could think of how
that would happen for you is if the output somehow starts with a keyword
like PASS/FAIL/WARNING/ERROR/etc. [ If you want to chase that difference
it could be useful to post a gdb.log/gdb.sum/stdout_stderr.log. ]
Anyway, the behaviour I'm seeing looks correct to me.
>> ...
>>
>> There is no reason to be this verbose about the failure to compile.
>>
>> Fix this by using quiet as additional option to gdb_compile in
>> dtrace_build_usdt_test_program. Note that the error message still
>> occurs in
>> gdb.log.
>>
>> Tested on x86_64-linux.
>>
>> OK for trunk?
>>
>> Thanks,
>> - Tom
>>
>> [gdb/testsuite] Be quiet about untested dtrace-prob.exp
>>
>> gdb/testsuite/ChangeLog:
>>
>> 2020-02-18 Tom de Vries <tdevries@suse.de>
>>
>> Â Â Â Â * lib/dtrace.exp (dtrace_build_usdt_test_program): Use quiet as
>> Â Â Â Â gdb_compile option.
>>
>> ---
>> Â gdb/testsuite/lib/dtrace.exp | 6 ++++--
>> Â 1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/gdb/testsuite/lib/dtrace.exp b/gdb/testsuite/lib/dtrace.exp
>> index 9aed481f32..8f861c9de4 100644
>> --- a/gdb/testsuite/lib/dtrace.exp
>> +++ b/gdb/testsuite/lib/dtrace.exp
>> @@ -52,7 +52,8 @@ proc dtrace_build_usdt_test_program {} {
>> Â Â Â Â Â }
>> Â Â Â Â Â Â # 2. Compile testprogram.c.
>> -Â Â Â set options [list debug additional_flags=-I[file dirname
>> $out_header_file]]
>> +Â Â Â set options [list debug quiet \
>> +Â Â Â Â Â Â Â Â Â Â Â Â additional_flags=-I[file dirname $out_header_file]]
>> Â Â Â Â Â if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}.o"
>> object ${options}] != ""} {
>> Â Â Â Â Â Â Â Â Â return -1
>> Â Â Â Â Â }
>> @@ -65,7 +66,8 @@ proc dtrace_build_usdt_test_program {} {
>> Â Â Â Â Â }
>> Â Â Â Â Â Â # 4. Link everything together to get the test program.
>> -Â Â Â if {[gdb_compile "${binfile}.o ${binfile}-p.o" ${binfile}
>> executable {debug}] != ""} {
>> +Â Â Â if {[gdb_compile "${binfile}.o ${binfile}-p.o" ${binfile}
>> executable \
>> +Â Â Â Â Â Â Â Â {debug quiet}] != ""} {
>> Â Â Â Â Â Â Â Â Â return -1
>> Â Â Â Â Â }
>> Â }
>>
> Then again, it wouldn't hurt to prevent noisy output. So, this LGTM.
Ack, thanks for the review.
- Tom
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH][gdb/testsuite] Be quiet about untested dtrace-prob.exp
2020-02-18 13:13 ` Tom de Vries
@ 2020-02-18 13:20 ` Luis Machado
2020-02-18 13:36 ` Tom de Vries
0 siblings, 1 reply; 6+ messages in thread
From: Luis Machado @ 2020-02-18 13:20 UTC (permalink / raw)
To: Tom de Vries, gdb-patches
On 2/18/20 10:13 AM, Tom de Vries wrote:
> On 18-02-2020 13:35, Luis Machado wrote:
>> On 2/18/20 9:02 AM, Tom de Vries wrote:
>>> Hi,
>>>
>>> When running gdb.base/dtrace-probe.exp, I get this on stdout/stderr:
>>> ...
>>> Running src/gdb/testsuite/gdb.base/dtrace-probe.exp ...
>>> gdb compile failed, ld: error in \
>>> Â Â build/gdb/testsuite/outputs/gdb.base/dtrace-probe/dtrace-probe.o\
>>> Â Â (.eh_frame); no .eh_frame_hdr table will be created
>>> ld: crt1.o: in function `_start':
>>> start.S:110: undefined reference to `main'
>>> ld: build/gdb/testsuite/outputs/gdb.base/dtrace-probe/dtrace-probe-p.o:\
>>> Â Â (.SUNW_dof+0x88): undefined reference to `main'
>>> ld: build/gdb/testsuite/outputs/gdb.base/dtrace-probe/dtrace-probe-p.o:\
>>> Â Â (.SUNW_dof+0xb8): undefined reference to `main'
>>> collect2: error: ld returned 1 exit status
>>>
>>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â === gdb Summary ===
>>>
>>> nr of untested testcases        1
>>
>> Odd. I'm running this natively on aarch64 and i don't see the same. I
>> only get output in gdb.log.
>>
>
> I've looked a bit at the semantics of output_clone (in
> /usr/share/dejagnu/framework.exp), and the only way I could think of how
> that would happen for you is if the output somehow starts with a keyword
> like PASS/FAIL/WARNING/ERROR/etc. [ If you want to chase that difference
> it could be useful to post a gdb.log/gdb.sum/stdout_stderr.log. ]
I think the setup i have differs from yours. I don't have DTtrace, so
the testsuite ends up using pdtrace. That somehow makes things go a
different way. The build ends up failing, but silently.
as: unrecognized option '-64
readelf: Error:
'binutils-gdb-master/gdb/testsuite/outputs/gdb.base/dtrace-probe/dtrace-probe-p.o':
No such file
error: could not extract the start of shdr from
binutils-gdb-master/gdb/testsuite/outputs/gdb.base/dtrace-probe/dtrace-probe-p.o
UNTESTED: gdb.base/dtrace-probe.exp: failed to compile
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][gdb/testsuite] Be quiet about untested dtrace-prob.exp
2020-02-18 13:20 ` Luis Machado
@ 2020-02-18 13:36 ` Tom de Vries
0 siblings, 0 replies; 6+ messages in thread
From: Tom de Vries @ 2020-02-18 13:36 UTC (permalink / raw)
To: Luis Machado, gdb-patches
On 18-02-2020 14:20, Luis Machado wrote:
> On 2/18/20 10:13 AM, Tom de Vries wrote:
>> On 18-02-2020 13:35, Luis Machado wrote:
>>> On 2/18/20 9:02 AM, Tom de Vries wrote:
>>>> Hi,
>>>>
>>>> When running gdb.base/dtrace-probe.exp, I get this on stdout/stderr:
>>>> ...
>>>> Running src/gdb/testsuite/gdb.base/dtrace-probe.exp ...
>>>> gdb compile failed, ld: error in \
>>>> Â Â Â build/gdb/testsuite/outputs/gdb.base/dtrace-probe/dtrace-probe.o\
>>>> Â Â Â (.eh_frame); no .eh_frame_hdr table will be created
>>>> ld: crt1.o: in function `_start':
>>>> start.S:110: undefined reference to `main'
>>>> ld:
>>>> build/gdb/testsuite/outputs/gdb.base/dtrace-probe/dtrace-probe-p.o:\
>>>> Â Â Â (.SUNW_dof+0x88): undefined reference to `main'
>>>> ld:
>>>> build/gdb/testsuite/outputs/gdb.base/dtrace-probe/dtrace-probe-p.o:\
>>>> Â Â Â (.SUNW_dof+0xb8): undefined reference to `main'
>>>> collect2: error: ld returned 1 exit status
>>>>
>>>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â === gdb Summary ===
>>>>
>>>> nr of untested testcases        1
>>>
>>> Odd. I'm running this natively on aarch64 and i don't see the same. I
>>> only get output in gdb.log.
>>>
>>
>> I've looked a bit at the semantics of output_clone (in
>> /usr/share/dejagnu/framework.exp), and the only way I could think of how
>> that would happen for you is if the output somehow starts with a keyword
>> like PASS/FAIL/WARNING/ERROR/etc. [ If you want to chase that difference
>> it could be useful to post a gdb.log/gdb.sum/stdout_stderr.log. ]
>
> I think the setup i have differs from yours. I don't have DTtrace, so
> the testsuite ends up using pdtrace.
Same here.
> That somehow makes things go a
> different way. The build ends up failing, but silently.
>
> as: unrecognized option '-64
> readelf: Error:
> 'binutils-gdb-master/gdb/testsuite/outputs/gdb.base/dtrace-probe/dtrace-probe-p.o':
> No such file
> error: could not extract the start of shdr from
> binutils-gdb-master/gdb/testsuite/outputs/gdb.base/dtrace-probe/dtrace-probe-p.o
>
> UNTESTED: gdb.base/dtrace-probe.exp: failed to compile
OK, that explains it. In both cases, dtrace_build_usdt_test_program
fails, in my case in a gdb_compile call, in your case in one of the
$dtrace calls (my guess is the second one).
Thanks,
- Tom
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][gdb/testsuite] Be quiet about untested dtrace-prob.exp
2020-02-18 12:02 [PATCH][gdb/testsuite] Be quiet about untested dtrace-prob.exp Tom de Vries
2020-02-18 12:35 ` Luis Machado
@ 2020-02-18 21:26 ` Tom Tromey
1 sibling, 0 replies; 6+ messages in thread
From: Tom Tromey @ 2020-02-18 21:26 UTC (permalink / raw)
To: Tom de Vries; +Cc: gdb-patches
>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
Tom> [gdb/testsuite] Be quiet about untested dtrace-prob.exp
Tom> gdb/testsuite/ChangeLog:
Tom> 2020-02-18 Tom de Vries <tdevries@suse.de>
Tom> * lib/dtrace.exp (dtrace_build_usdt_test_program): Use quiet as
Tom> gdb_compile option.
This seems reasonable to me.
Tom
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-02-18 21:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-18 12:02 [PATCH][gdb/testsuite] Be quiet about untested dtrace-prob.exp Tom de Vries
2020-02-18 12:35 ` Luis Machado
2020-02-18 13:13 ` Tom de Vries
2020-02-18 13:20 ` Luis Machado
2020-02-18 13:36 ` Tom de Vries
2020-02-18 21:26 ` Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox