This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2 8/8] Fixup testcases outputting own name as a test name and standardize failed compilation messages


On 12/01/2016 05:08 AM, Pedro Alves wrote:
I thought I had sent this yesterday, but I now see I haven't..

On 11/25/2016 08:54 PM, Luis Machado wrote:
--- a/gdb/testsuite/gdb.base/info-shared.exp
+++ b/gdb/testsuite/gdb.base/info-shared.exp
@@ -31,13 +31,13 @@ set define2 -DSHLIB2_NAME=\"$binfile_lib2\"

 if { [gdb_compile_shlib $srcfile_lib1 $binfile_lib1 \
 	  [list additional_flags=-fPIC]] != "" } {
-    untested "could not compile $binfile_lib1."
+    untested "failed to compile shared library"
     return -1
 }

 if { [gdb_compile_shlib $srcfile_lib2 $binfile_lib2 \
 	  [list additional_flags=-fPIC]] != "" } {
-    untested "could not compile $binfile_lib2."
+    untested "failed to compile shared library"
     return -1

Duplicate test message.  Write something like:

  untested "failed to compile shared library 1"
  untested "failed to compile shared library 2"

Another example (though unlike the above, this case was already
duplicate):

--- a/gdb/testsuite/gdb.base/attach.exp
+++ b/gdb/testsuite/gdb.base/attach.exp
@@ -30,14 +30,14 @@ remote_exec build "rm -f ${binfile} ${binfile2}"
 # build the first test case
 #
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested attach.exp
+    untested "failed to compile"
     return -1
 }

    untested "failed to compile first test case"


 # Build the in-system-call test

 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" executable {debug}] != "" } {
-    untested attach.exp
+    untested "failed to compile"

    untested "failed to compile in-system-call test"


There are likely more instances in the patch.  Since you're now reusing the same
string on all tests, I think it should be easy to grep (+sort+uniq)
for "failed to compile" to catch them.  Could you do that?

Thanks,
Pedro Alves


Sure. I'll get those addressed.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]