This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH, take 2] Fix ld-plugin testsuite noise properly [was Re: [PATCH] Fix oopsie in ld-plugin tests.]
- From: Dave Korn <dave dot korn dot cygwin at gmail dot com>
- To: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- Cc: hp at axis dot com, binutils at sourceware dot org
- Date: Fri, 15 Oct 2010 20:47:31 +0100
- Subject: [PATCH, take 2] Fix ld-plugin testsuite noise properly [was Re: [PATCH] Fix oopsie in ld-plugin tests.]
- References: <201010151902.o9FJ26dk008986@ignucius.se.axis.com>
On 15/10/2010 20:02, Hans-Peter Nilsson wrote:
>> Date: Fri, 15 Oct 2010 20:18:21 +0100
>> From: Dave Korn <dave.korn.cygwin@gmail.com>
>
>> On 15/10/2010 19:10, Hans-Peter Nilsson wrote:
>>>> Date: Thu, 14 Oct 2010 06:24:04 +0100
>>>> From: Dave Korn <dave.korn.cygwin@gmail.com>
>>>> ld/testsuite/ChangeLog:
>>>>
>>>> * ld-plugin/plugin.exp: Don't error out if there is no target compiler
>>>> available, make tests UNSUPPORTED instead.
>>>> +if { !$can_compile || $failed_compile } {
>>>> foreach testitem $plugin_tests {
>>>> unresolved [lindex $testitem 0]
>>> Incorrect, or you sent and committed the wrong patch. You made
>>> them UNRESOLVED, which causes make to (still) return an error.
>> Sorry, that was what you suggested in your off-list email. Did you mean to
>> says UNSUPPORTED perhaps?
>
> Yes, as I also mentioned off-list, presumably after you sent this. :)
Heh, just a bit!
> (and the patch didn't match the ChangeLog; UNSUPPORTED != UNRESOLVED)
> Right, too many choices!
The attached patch makes it UNSUPPORTED if no compiler is found, and only
UNRESOLVED if there's a compiler error of some sort.
ld/testsuite/ChangeLog:
* ld-plugin/plugin.exp: Mark tests UNSUPPORTED, not UNRESOLVED, if
no suitable target compiler is available.
OK for trunk?
cheers,
DaveK
>From 408a48b67f43adb6ddabc8cfd67eed9d24e39158 Mon Sep 17 00:00:00 2001
From: Dave Korn <dave.korn.cygwin@gmail.com>
Date: Fri, 15 Oct 2010 20:43:28 +0100
Subject: [PATCH] Clean up ld-plugin testsuite noise.
ld/testsuite/ChangeLog:
* ld-plugin/plugin.exp: Mark tests UNSUPPORTED, not UNRESOLVED, if
no suitable target compiler is available.
---
ld/testsuite/ld-plugin/plugin.exp | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/ld/testsuite/ld-plugin/plugin.exp b/ld/testsuite/ld-plugin/plugin.exp
index 416159a..0a556e2 100644
--- a/ld/testsuite/ld-plugin/plugin.exp
+++ b/ld/testsuite/ld-plugin/plugin.exp
@@ -26,9 +26,11 @@ if ![check_plugin_api_available] {
# And a compiler to be available.
set can_compile 1
+set failure_kind "unresolved"
if { [which $CC] == 0 } {
# Don't fail immediately,
set can_compile 0
+ set failure_kind "unsupported"
}
pass "plugin API enabled"
@@ -154,11 +156,11 @@ set plugin_extra_elf_tests [list \
if { !$can_compile || $failed_compile } {
foreach testitem $plugin_tests {
- unresolved [lindex $testitem 0]
+ $failure_kind [lindex $testitem 0]
}
if { [is_elf_format] } {
foreach testitem $plugin_extra_elf_tests {
- unresolved [lindex $testitem 0]
+ $failure_kind [lindex $testitem 0]
}
}
return
@@ -172,7 +174,7 @@ if { [is_elf_format] } {
if ![ar_simple_create $ar "" "tmpdir/libtext.a" "tmpdir/text.o"] {
foreach testitem $plugin_lib_tests {
- unresolved [lindex $testitem 0]
+ $failure_kind [lindex $testitem 0]
}
} else {
run_ld_link_tests $plugin_lib_tests