]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite] Be quiet about untested dtrace-prob.exp
authorTom de Vries <tdevries@suse.de>
Tue, 18 Feb 2020 23:05:40 +0000 (00:05 +0100)
committerTom de Vries <tdevries@suse.de>
Tue, 18 Feb 2020 23:05:40 +0000 (00:05 +0100)
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.

gdb/testsuite/ChangeLog:

2020-02-19  Tom de Vries  <tdevries@suse.de>

* lib/dtrace.exp (dtrace_build_usdt_test_program): Use quiet as
gdb_compile option.

gdb/testsuite/ChangeLog
gdb/testsuite/lib/dtrace.exp

index 8c09052f9f5c073ee4ebb294147d0d9171851b63..fb733dfec0478a94263ffef230d3ee59a6775921 100644 (file)
@@ -1,3 +1,8 @@
+2020-02-19  Tom de Vries  <tdevries@suse.de>
+
+       * lib/dtrace.exp (dtrace_build_usdt_test_program): Use quiet as
+       gdb_compile option.
+
 2020-02-18  Simon Marchi  <simon.marchi@efficios.com>
 
        * gdb.base/printcmds.exp (test_print_enums): Update expected
index 9aed481f32dbf3f017b30f773d65408bdacf97e5..8f861c9de42f2e57188fc74159cd2d54a0f29d5d 100644 (file)
@@ -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
     }
 }