public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jiong Wang <jiong.wang@arm.com>
To: Mike Stump <mikestump@comcast.net>,
	 Kyrylo Tkachov <Kyrylo.Tkachov@arm.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: [PATCH][dejagnu]  gcc-dg-prune glitch when filtering "relocation truncation" error
Date: Tue, 21 Oct 2014 14:08:00 -0000	[thread overview]
Message-ID: <54466892.1030708@arm.com> (raw)
In-Reply-To: <402A66B7-44AD-494D-8B40-4368ACC449B4@comcast.net>

[-- Attachment #1: Type: text/plain, Size: 1478 bytes --]


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.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: fix-deja-v2.patch --]
[-- Type: text/x-patch; name=fix-deja-v2.patch, Size: 1510 bytes --]

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

  reply	other threads:[~2014-10-21 14:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-22 11:23 [PATCH][AArch64][tests]Skip graphite tests that don't fit -mcmodel=tiny Kyrill Tkachov
2014-07-22 15:04 ` Sebastian Pop
2014-07-22 15:17   ` Kyrill Tkachov
2014-07-22 20:40 ` Mike Stump
2014-07-30 21:40   ` Mike Stump
     [not found]     ` <CAJA7tRYxZbYVzrYNzj2mQNoyx2oXOmNParie4vtuXgDrTN-wUQ@mail.gmail.com>
2014-08-01  0:00       ` Mike Stump
2014-08-07  8:38         ` Kyrill Tkachov
2014-08-08 17:54           ` Mike Stump
2014-08-11  9:06             ` Richard Earnshaw
2014-08-11 17:35               ` Mike Stump
2014-08-19 13:12                 ` Kyrill Tkachov
2014-08-19 16:30                   ` Mike Stump
2014-10-21 14:08                     ` Jiong Wang [this message]
2014-10-21 18:14                       ` [PATCH][dejagnu] gcc-dg-prune glitch when filtering "relocation truncation" error Jeff Law

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=54466892.1030708@arm.com \
    --to=jiong.wang@arm.com \
    --cc=Kyrylo.Tkachov@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=mikestump@comcast.net \
    /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).