* [PATCH] ld/testsuite: skip tests related to -shared when disabled
@ 2022-11-04 16:33 Clément Chigot
2022-11-07 11:13 ` Nick Clifton
0 siblings, 1 reply; 2+ messages in thread
From: Clément Chigot @ 2022-11-04 16:33 UTC (permalink / raw)
To: binutils; +Cc: Clément Chigot
I didn't remove the hardcoded switch below as I'm not sure if some
platforms still want to skip these tests even if the shared support is
there.
---
Call the helper function "check_shared_lib_support" to ensure -shared
is enabled before launching ld-shared, ld-elfweak and ld-elfvers.
This allows to catch custom targets explicitly disabling it.
ld/ChangeLog:
* testsuite/ld-elfvers/vers.exp: Call check_shared_lib_support.
* testsuite/ld-elfweak/elfweak.exp: Likewise.
* testsuite/ld-shared/shared.exp: Likewise.
---
ld/testsuite/ld-elfvers/vers.exp | 5 +++++
ld/testsuite/ld-elfweak/elfweak.exp | 5 +++++
ld/testsuite/ld-shared/shared.exp | 5 +++++
3 files changed, 15 insertions(+)
diff --git a/ld/testsuite/ld-elfvers/vers.exp b/ld/testsuite/ld-elfvers/vers.exp
index 3e2ba2aac07..2e44d4a410f 100644
--- a/ld/testsuite/ld-elfvers/vers.exp
+++ b/ld/testsuite/ld-elfvers/vers.exp
@@ -27,6 +27,11 @@ if { ![check_compiler_available] } {
return
}
+# Skip targets where -shared is not supported
+if { ![check_shared_lib_support] } {
+ return
+}
+
# This test can only be run on a couple of ELF platforms.
# Square bracket expressions seem to confuse istarget.
# This is similar to the test that is used in ld-shared, BTW.
diff --git a/ld/testsuite/ld-elfweak/elfweak.exp b/ld/testsuite/ld-elfweak/elfweak.exp
index 99188654df1..69826803a17 100644
--- a/ld/testsuite/ld-elfweak/elfweak.exp
+++ b/ld/testsuite/ld-elfweak/elfweak.exp
@@ -27,6 +27,11 @@ if { ![check_compiler_available] } {
return
}
+# Skip targets where -shared is not supported
+if { ![check_shared_lib_support] } {
+ return
+}
+
# This test can only be run on a couple of ELF platforms.
# Square bracket expressions seem to confuse istarget.
# This is similar to the test that is used in ld-shared, BTW.
diff --git a/ld/testsuite/ld-shared/shared.exp b/ld/testsuite/ld-shared/shared.exp
index 229fddbd436..94e03fceff9 100644
--- a/ld/testsuite/ld-shared/shared.exp
+++ b/ld/testsuite/ld-shared/shared.exp
@@ -30,6 +30,11 @@ if { ![check_compiler_available] } {
return
}
+# Skip targets where -shared is not supported
+if { ![check_shared_lib_support] } {
+ return
+}
+
# This test can only be run on a couple of ELF platforms.
# Square bracket expressions seem to confuse istarget.
if { ![istarget hppa*64*-*-hpux*] \
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ld/testsuite: skip tests related to -shared when disabled
2022-11-04 16:33 [PATCH] ld/testsuite: skip tests related to -shared when disabled Clément Chigot
@ 2022-11-07 11:13 ` Nick Clifton
0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2022-11-07 11:13 UTC (permalink / raw)
To: Clément Chigot, binutils
Hi Clément,
> Call the helper function "check_shared_lib_support" to ensure -shared
> is enabled before launching ld-shared, ld-elfweak and ld-elfvers.
> This allows to catch custom targets explicitly disabling it.
>
> ld/ChangeLog:
>
> * testsuite/ld-elfvers/vers.exp: Call check_shared_lib_support.
> * testsuite/ld-elfweak/elfweak.exp: Likewise.
> * testsuite/ld-shared/shared.exp: Likewise.
Approved, please apply.
Cheers
Nick
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-07 11:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-04 16:33 [PATCH] ld/testsuite: skip tests related to -shared when disabled Clément Chigot
2022-11-07 11:13 ` Nick Clifton
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).