This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH][dejagnu] gcc-dg-prune glitch when filtering "relocation truncation" error
- From: Jiong Wang <jiong dot wang at arm dot com>
- To: Mike Stump <mikestump at comcast dot net>, Kyrylo Tkachov <Kyrylo dot Tkachov at arm dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 21 Oct 2014 15:07:14 +0100
- Subject: [PATCH][dejagnu] gcc-dg-prune glitch when filtering "relocation truncation" error
- Authentication-results: sourceware.org; auth=none
- References: <53CE448E dot 4060109 at arm dot com> <558B280E-4993-4FC6-9A57-A12ECB4A9B10 at comcast dot net> <77E8A918-CCEF-4F2F-9E17-8866991575BE at comcast dot net> <CAJA7tRYxZbYVzrYNzj2mQNoyx2oXOmNParie4vtuXgDrTN-wUQ at mail dot gmail dot com> <C3D47CDB-126C-4B9D-BB1D-516B246BF1EE at comcast dot net> <53E33AE9 dot 4050902 at arm dot com> <975E949D-CAEF-48E8-9BCF-F95188EA7A12 at comcast dot net> <53E88797 dot 2050304 at arm dot com> <8E1B2289-3353-4A30-882A-2A1FC024F8E3 at comcast dot net> <53F34D3D dot 4070104 at arm dot com> <402A66B7-44AD-494D-8B40-4368ACC449B4 at comcast dot net>
On 19/08/14 17:30, Mike Stump wrote:
On Aug 19, 2014, at 6:12 AM, Kyrill Tkachov <kyrylo.tkachov@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