Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch, testsuite] Skip gnu-ifunc tests if building the testcase fails
@ 2018-09-26  5:08 Sandra Loosemore
  2018-09-26 11:50 ` Rainer Orth
  0 siblings, 1 reply; 4+ messages in thread
From: Sandra Loosemore @ 2018-09-26  5:08 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 505 bytes --]

gdb.base/gnu-ifunc.exp doesn't fail gracefully on targets that don't 
support this feature -- on nios2-linux-gnu I've seen TCL errors from 
trying to copy the nonexistent shared library that fails to build to the 
target.

I see that ld/testsuite/ld-ifunc/ifunc.exp explicitly lists all the 
targets where IFUNC is expected to work, but it seemed more maintainable 
to me to tweak these gdb tests to pay attention to the return status 
from trying to build the test cases.  Is this OK to commit?

-Sandra

[-- Attachment #2: ifunc.patch --]
[-- Type: text/x-patch, Size: 1516 bytes --]

commit 1e4269b8d83d6c8cdb5351efa2b346a714a250aa
Author: Sandra Loosemore <sandra@codesourcery.com>
Date:   Tue Sep 25 21:54:52 2018 -0700

    Skip gnu-ifunc tests if building the testcase fails.
    
    2018-09-25  Sandra Loosemore  <sandra@codesourcery.com>
    
    	* gdb.base/gnu-ifunc.exp: Skip tests if building testcase fails.

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index d15fcff..72bf6bd 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2018-09-25  Sandra Loosemore  <sandra@codesourcery.com>
+
+	* gdb.base/gnu-ifunc.exp: Skip tests if building testcase fails.
+
 2018-09-24  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
 
 	PR gdb/20948
diff --git a/gdb/testsuite/gdb.base/gnu-ifunc.exp b/gdb/testsuite/gdb.base/gnu-ifunc.exp
index d6ec698..ffaf254 100644
--- a/gdb/testsuite/gdb.base/gnu-ifunc.exp
+++ b/gdb/testsuite/gdb.base/gnu-ifunc.exp
@@ -365,9 +365,10 @@ proc misc_tests {resolver_attr resolver_debug final_debug} {
 foreach_with_prefix resolver_attr {0 1} {
     foreach_with_prefix resolver_debug {0 1} {
 	foreach_with_prefix final_debug {0 1} {
-	    build $resolver_attr $resolver_debug $final_debug
-	    misc_tests $resolver_attr $resolver_debug $final_debug
-	    set-break $resolver_attr $resolver_debug $final_debug
+	    if { [build $resolver_attr $resolver_debug $final_debug] != 0 } {
+		misc_tests $resolver_attr $resolver_debug $final_debug
+		set-break $resolver_attr $resolver_debug $final_debug
+	    }
 	}
     }
 }

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

end of thread, other threads:[~2018-09-27 20:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-26  5:08 [patch, testsuite] Skip gnu-ifunc tests if building the testcase fails Sandra Loosemore
2018-09-26 11:50 ` Rainer Orth
2018-09-27  2:20   ` Sandra Loosemore
2018-09-27 20:31     ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox