public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Janis Johnson <janisjo@codesourcery.com>
To: "Joseph S. Myers" <joseph@codesourcery.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
	 Mike Stump <mikestump@comcast.net>
Subject: Re: [testsuite] dg-final object-size: fail if file does not exist
Date: Thu, 16 Jun 2011 23:12:00 -0000	[thread overview]
Message-ID: <4DFA7FF9.9060007@codesourcery.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1106161705290.5025@digraph.polyomino.org.uk>

On 06/16/2011 10:08 AM, Joseph S. Myers wrote:
> On Thu, 16 Jun 2011, Janis Johnson wrote:
> 
>> Currently the dg-final check "object-size" results in ERROR if the
>> assemble failed and the object file does not exist.  This patch fails
>> the test instead.  OK for trunk?
> 
> The set of testcase names - the things after "PASS: " or "FAIL: " or other 
> statuses - should not depend on the results if comparison is to work well, 
> so
> 
> +       fail "$testcase $output_file does not exist"
> 
> is a bad idea unless there is a corresponding
> 
> 	pass "$testcase $output_file does not exist"
> 
> (obvious nonsense) as the alternative.  Instead you should:
> 
> * Make sure the compilation of the test produced its own PASS or FAIL 
> line.
> 
> * If that failed, report the subsequent test as UNRESOLVED.
> 
> 	unresolved "$testcase object-size $what $cmp $with"
> 

This issue also affects other procedures used from dg-final, including
the scan-assembler and scan-dump variants.  The scan-dump routines
append "dump file does not exist" to the usual FAIL messages and the
scan-assembler routines report ERROR.  I'll fix those after I
understand the correct fix for object-size.  These routines don't have
access to the pass/fail status of the compilation, and the compilation
step doesn't know about dg-final checks.

Pass/fail messages for "object-size text <=  32" are:

PASS: gcc.target/arm/ivopts-6.c object-size text <= 32
FAIL: gcc.target/arm/ivopts-6.c object-size text <= 32

If the file doesn't exist the message could be:

UNRESOLVED: gcc.target/arm/ivopts-6.c object-size text <= 32

Currently there are several possible causes for failure in object-size.
Some are errors in the test itself, like the wrong number of arguments,
but some others could be UNRESOLVED instead of ERROR, such as the "size"
command failing or producing unexpected output.  Can the UNRESOLVED line
include additional information about the reason for the failure, or
should the reason just be in a message in the log file?

Janis

  reply	other threads:[~2011-06-16 22:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-16 17:07 Janis Johnson
2011-06-16 17:26 ` Joseph S. Myers
2011-06-16 23:12   ` Janis Johnson [this message]
2011-06-16 23:55     ` Joseph S. Myers
2011-06-17  1:09       ` Janis Johnson
2011-06-18 14:50         ` Mike Stump
2011-06-16 20:38 ` Mike Stump

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=4DFA7FF9.9060007@codesourcery.com \
    --to=janisjo@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=joseph@codesourcery.com \
    --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).