On 19/08/14 17:30, Mike Stump wrote:
On Aug 19, 2014, at 6:12 AM, Kyrill Tkachov <kyrylo.tkac...@arm.com> wrote:
So how about this?
Ok. Thanks.
looks like this patch only fixed one invoke path.
currently, "gcc-dg-prune" may be invoked directly *or* via
${tool}_check_compile:
and "gcc-dg-prune" is implemented to return "::unsupported::memory full" if the
input
message contains the "relocation truncated" error pattern.
this return message it OK if it's invoked directly, while it will be wrong if
it's invoked
via ${tool}_check_compile. because the ${tool}_check_compile has a duplicated
check of unsupported
testcase later via "${tool}_check_unsupported_p" which only works with original
output message by
matching the "relocation truncation" keyword. So, our early hijack of the error
in gcc-dg-prune
will replace those keywords to "::unsupported::memory" which confuse the later
check.
this patch doing the following cleanup:
* modify the expected output in ${tool}_check_compile.
if "gcc-dg-prune" invoked, then we expect "::unsupported::" keyword for
unsupported testcase.
* remove the duplicated "unresolve" report in compat.exp.
for all ${tool}_check_compile return 0, the issue is handled already. No need
to report a redundant status.
ok for trunk?
gcc/testsuite/
* lib/compat.exp (compat-run): Remove "unresolved".
* lib/gcc-defs.exp (${tools}_check_compile): Update code logic for
unsupported testcase.
diff --git a/gcc/testsuite/lib/compat.exp b/gcc/testsuite/lib/compat.exp
index 7ab85aa..45cf0e0 100644
--- a/gcc/testsuite/lib/compat.exp
+++ b/gcc/testsuite/lib/compat.exp
@@ -134,7 +134,6 @@ proc compat-run { testname objlist dest optall optfile optstr } {
"$options"]
if ![${tool}_check_compile "$testcase $testname link" "" \
$dest $comp_output] then {
- unresolved "$testcase $testname execute $optstr"
return
}
diff --git a/gcc/testsuite/lib/gcc-defs.exp b/gcc/testsuite/lib/gcc-defs.exp
index cb93238..d479667 100644
--- a/gcc/testsuite/lib/gcc-defs.exp
+++ b/gcc/testsuite/lib/gcc-defs.exp
@@ -54,12 +54,17 @@ proc ${tool}_check_compile {testcase option objname gcc_output} {
if { [info proc ${tool}-dg-prune] != "" } {
global target_triplet
set gcc_output [${tool}-dg-prune $target_triplet $gcc_output]
- }
-
- set unsupported_message [${tool}_check_unsupported_p $gcc_output]
- if { $unsupported_message != "" } {
- unsupported "$testcase: $unsupported_message"
- return 0
+ if [string match "*::unsupported::*" $gcc_output] then {
+ regsub -- "::unsupported::" $gcc_output "" gcc_output
+ unsupported "$testcase: $gcc_output"
+ return 0
+ }
+ } else {
+ set unsupported_message [${tool}_check_unsupported_p $gcc_output]
+ if { $unsupported_message != "" } {
+ unsupported "$testcase: $unsupported_message"
+ return 0
+ }
}
# remove any leftover LF/CR to make sure any output is legit