Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Sandra Loosemore <sandra@codesourcery.com>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: [patch, testsuite] Skip gnu-ifunc tests if building the testcase fails
Date: Wed, 26 Sep 2018 05:08:00 -0000	[thread overview]
Message-ID: <0416cc5d-337b-82ae-5f37-07f28eaa35b3@codesourcery.com> (raw)

[-- 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
+	    }
 	}
     }
 }

             reply	other threads:[~2018-09-26  5:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-26  5:08 Sandra Loosemore [this message]
2018-09-26 11:50 ` Rainer Orth
2018-09-27  2:20   ` Sandra Loosemore
2018-09-27 20:31     ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0416cc5d-337b-82ae-5f37-07f28eaa35b3@codesourcery.com \
    --to=sandra@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox