From: Andrew Burgess <andrew.burgess@embecosm.com>
To: binutils@sourceware.org
Cc: Andrew Burgess <andrew.burgess@embecosm.com>
Subject: [PATCH 2/4] ld: Find and run some tests using a wildcard pattern
Date: Tue, 09 Jan 2018 21:09:00 -0000 [thread overview]
Message-ID: <457dc4e23af20dde3e5cb66a6a9fde1abe14d19c.1515531328.git.andrew.burgess@embecosm.com> (raw)
In-Reply-To: <cover.1515531328.git.andrew.burgess@embecosm.com>
In-Reply-To: <cover.1515531328.git.andrew.burgess@embecosm.com>
Find the ld-script/provide-*.d tests using a wildcard, then run them in
a loop. This will make it easier to add more tests in the future. Some
associated clean up is required.
ld/ChangeLog:
* testsuite/ld-scripts/provide-3.d: Add xfail directive.
* testsuite/ld-scripts/provide-4.d: Use new map file name.
* testsuite/ld-scripts/provide-5.d: Use new map file name.
* testsuite/ld-scripts/provide-4-map.d: Renamed to...
* testsuite/ld-scripts/provide-4.map: ...this.
* testsuite/ld-scripts/provide-5-map.d: Renamed to...
* testsuite/ld-scripts/provide-5.map: ...this.
* testsuite/ld-scripts/provide.exp: Move xfail into provide-3.d
file, and run tests in a loop.
---
ld/ChangeLog | 12 ++++++++++++
ld/testsuite/ld-scripts/provide-3.d | 1 +
ld/testsuite/ld-scripts/provide-4.d | 2 +-
ld/testsuite/ld-scripts/{provide-4-map.d => provide-4.map} | 0
ld/testsuite/ld-scripts/provide-5.d | 2 +-
ld/testsuite/ld-scripts/{provide-5-map.d => provide-5.map} | 0
ld/testsuite/ld-scripts/provide.exp | 12 ++++++------
7 files changed, 21 insertions(+), 8 deletions(-)
rename ld/testsuite/ld-scripts/{provide-4-map.d => provide-4.map} (100%)
rename ld/testsuite/ld-scripts/{provide-5-map.d => provide-5.map} (100%)
diff --git a/ld/testsuite/ld-scripts/provide-3.d b/ld/testsuite/ld-scripts/provide-3.d
index c8b12dafe7f..a5855e6b473 100644
--- a/ld/testsuite/ld-scripts/provide-3.d
+++ b/ld/testsuite/ld-scripts/provide-3.d
@@ -1,3 +1,4 @@
#source: provide-3.s
#ld: -T provide-3.t
#error: symbol defined in linker script and object file
+#xfail: "*-*-*"
diff --git a/ld/testsuite/ld-scripts/provide-4.d b/ld/testsuite/ld-scripts/provide-4.d
index a7d37e3c347..18699f221da 100644
--- a/ld/testsuite/ld-scripts/provide-4.d
+++ b/ld/testsuite/ld-scripts/provide-4.d
@@ -1,7 +1,7 @@
#source: provide-2.s
#ld: -T provide-4.t
#PROG: nm
-#map: provide-4-map.d
+#map: provide-4.map
#...
0+3 A baz
0+2000 D foo
diff --git a/ld/testsuite/ld-scripts/provide-4-map.d b/ld/testsuite/ld-scripts/provide-4.map
similarity index 100%
rename from ld/testsuite/ld-scripts/provide-4-map.d
rename to ld/testsuite/ld-scripts/provide-4.map
diff --git a/ld/testsuite/ld-scripts/provide-5.d b/ld/testsuite/ld-scripts/provide-5.d
index 1b14fa6a2fe..2a8baec605b 100644
--- a/ld/testsuite/ld-scripts/provide-5.d
+++ b/ld/testsuite/ld-scripts/provide-5.d
@@ -1,6 +1,6 @@
#source: provide-5.s
#ld: -T provide-5.t
#PROG: nm
-#map: provide-5-map.d
+#map: provide-5.map
#...
0+10 A foo
diff --git a/ld/testsuite/ld-scripts/provide-5-map.d b/ld/testsuite/ld-scripts/provide-5.map
similarity index 100%
rename from ld/testsuite/ld-scripts/provide-5-map.d
rename to ld/testsuite/ld-scripts/provide-5.map
diff --git a/ld/testsuite/ld-scripts/provide.exp b/ld/testsuite/ld-scripts/provide.exp
index 3a0b2e8070f..01bf934d17e 100644
--- a/ld/testsuite/ld-scripts/provide.exp
+++ b/ld/testsuite/ld-scripts/provide.exp
@@ -36,11 +36,11 @@ if [istarget "x86_64-*-mingw*"] then {
set LDFLAGS "$LDFLAGS --image-base 0"
}
-run_dump_test provide-1
-run_dump_test provide-2
-setup_xfail *-*-*
-run_dump_test provide-3
-run_dump_test provide-4
-run_dump_test provide-5
+set test_list [lsort [glob -nocomplain $srcdir/$subdir/provide-*.d]]
+foreach test_file $test_list {
+ set test_name [file rootname $test_file]
+ verbose $test_name
+ run_dump_test $test_name
+}
set LDFLAGS "$saved_LDFLAGS"
--
2.14.3
next prev parent reply other threads:[~2018-01-09 21:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-09 21:09 [PATCH 0/4] Fix issue with PROVIDE in linker scripts Andrew Burgess
2018-01-09 21:09 ` Andrew Burgess [this message]
2018-01-10 6:47 ` [PATCH 2/4] ld: Find and run some tests using a wildcard pattern Alan Modra
2018-01-09 21:09 ` [PATCH 4/4] ld: Remove unused expression state Andrew Burgess
2018-01-10 6:50 ` Alan Modra
2018-01-09 21:09 ` [PATCH 3/4] ld: Fix issue where PROVIDE overrides defined symbol Andrew Burgess
2018-01-10 6:50 ` Alan Modra
2018-01-09 21:09 ` [PATCH 1/4] ld: In map file use '=' in PROVIDE statements Andrew Burgess
2018-01-10 6:45 ` Alan Modra
2018-01-11 17:42 ` [PATCH 0/4] Fix issue with PROVIDE in linker scripts Andrew Burgess
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=457dc4e23af20dde3e5cb66a6a9fde1abe14d19c.1515531328.git.andrew.burgess@embecosm.com \
--to=andrew.burgess@embecosm.com \
--cc=binutils@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).