public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Thomas Schwinge <thomas@codesourcery.com>
To: <gcc@gcc.gnu.org>, <ro@CeBiTec.Uni-Bielefeld.DE>,
	<mikestump@comcast.net>
Cc: <dejagnu@gnu.org>
Subject: DejaGnu/GCC testsuite behavior regarding multiple 'dg-do'
Date: Wed, 13 May 2020 12:26:35 +0200	[thread overview]
Message-ID: <87zhac871g.fsf@euler.schwinge.homeip.net> (raw)

Hi!

Comparing DejaGnu/GCC testsuite '*.sum' files between two systems ("old"
vs. "new") that ought to return identical results, I found that they
didn't:

    @@ -75032,6 +75023,7 @@ PASS: g++.dg/expr/bitfield4.C  -std=c++98 (test for excess errors)
     PASS: g++.dg/expr/bitfield5.C  -std=c++14  (test for warnings, line 12)
     PASS: g++.dg/expr/bitfield5.C  -std=c++14  (test for warnings, line 16)
     PASS: g++.dg/expr/bitfield5.C  -std=c++14 (test for excess errors)
    +PASS: g++.dg/expr/bitfield5.C  -std=c++14 execution test
     PASS: g++.dg/expr/bitfield5.C  -std=c++17  (test for errors, line 12)
     PASS: g++.dg/expr/bitfield5.C  -std=c++17  (test for errors, line 16)
     PASS: g++.dg/expr/bitfield5.C  -std=c++17 (test for excess errors)
    @@ -75041,6 +75033,7 @@ PASS: g++.dg/expr/bitfield5.C  -std=c++2a (test for excess errors)
     PASS: g++.dg/expr/bitfield5.C  -std=c++98  (test for warnings, line 12)
     PASS: g++.dg/expr/bitfield5.C  -std=c++98  (test for warnings, line 16)
     PASS: g++.dg/expr/bitfield5.C  -std=c++98 (test for excess errors)
    +PASS: g++.dg/expr/bitfield5.C  -std=c++98 execution test
     PASS: g++.dg/expr/bitfield6.C  -std=c++14  (test for warnings, line 10)
     PASS: g++.dg/expr/bitfield6.C  -std=c++14 (test for excess errors)
     PASS: g++.dg/expr/bitfield6.C  -std=c++17  (test for errors, line 10)

..., and several more like that.

'g++.dg/expr/bitfield5.C':

    // PR c++/30274
    // { dg-do run { target c++14_down } }
    // { dg-do compile { target c++17 } }
    [...]
      s.x++; // { dg-warning "5:use of an operand of type .bool. in .operator\\+\\+. is deprecated" "" { target { ! c++17 } } }
      // { dg-error "forbidden" "" { target c++17 } .-1 }
    [...]

So, this is meant to be an execution test for C++14 and older, and a
compile test for C++17 and newer.  This pattern seems to be recognized on
the "new" system, but not on the "old" system, where execution tests
aren't being run, only compile tests.

The "old" system, powerpc64le-unknown-linux-gnu Ubuntu 14.04, has DejaGnu
1.5-3ubuntu1.  Also reproduced on a x86_64-pc-linux-gnu Ubuntu 12.10
system with DejaGnu 1.5-3.

The "new" system, powerpc64le-unknown-linux-gnu Ubuntu 18.04, has DejaGnu
1.6.1-1.  Also reproduced on a x86_64-pc-linux-gnu Ubuntu 18.04 system
with DejaGnu 1.6.1-1.  And: also reproduced on the "old" system, when
instead of system-provided DejaGnu 1.5-3ubuntu1 manually running with
Ubuntu 18.04 DejaGnu 1.6.1-1.

Relevant (but haven't verified) seems to be the following DejaGnu commit:

    commit 569f8718b534a2cd9511a7d640352eb0126ff492
    Author: Dominik Vogt <vogt@linux.vnet.ibm.com>
    Date:   Mon Mar 28 17:31:07 2016 +1100

            * dg.exp (dg-do): Do not change the previously selected action if
            a de-selected dg-do is encountered.

Discussed in
<http://mid.mail-archive.com/20160308132910.GA30210@linux.vnet.ibm.com>,
and this indeed got included for DejaGnu 1.6.

Looking through the GCC testuite for test case files with more than one
'dg-do', the confusing thing is that this pattern has already been used
for a very long time.  See, for example, commit
5bdf05c8743e7486521ce3a3981ac3e6e7850ad0 (r143350, 2009-01-13):

    -/* { dg-do run { target powerpc*-*-* } } */
    +/* { dg-do run { target { powerpc*-*-* && vmx_hw } } } */
    +/* { dg-do compile { target { powerpc*-*-* && { ! vmx_hw } } } } */

I have not found any evidence in DejaGnu master branch that this not
working would've been a "recent" DejaGnu regression (and then fixed for
DejaGnu 1.6) -- so do we have to assume that this never worked as
intended back then?

I have not found an easy way to express different 'do-what-keyword'
within one test case file that work with old and new DejaGnu.

Per our "Prerequisites for GCC" installation documentation, we currently
require DejaGnu 1.4.4.  Advancing that to 1.6 is probably out of
question, given that it has "just" been released (four years ago).

As the failure mode with old DejaGnu is "benign" (only causes missing
execution testing), we could simply move on, and accept non-reproducible
results between different DejaGnu versions?  Kind of lame...  ;-|


Grüße
 Thomas
-----------------
Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany
Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter

             reply	other threads:[~2020-05-13 10:26 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-13 10:26 Thomas Schwinge [this message]
2020-05-13 16:51 ` dejagnu version update? Mike Stump
2020-05-13 17:43   ` Jonathan Wakely
2020-05-13 18:29     ` Rainer Orth
2020-05-13 23:43       ` Maciej W. Rozycki
2020-05-14 14:08         ` Rainer Orth
2020-05-14 15:12           ` Rob Savoye
2020-05-14 16:08             ` David Edelsohn
2020-05-14 16:45               ` Rob Savoye
2020-05-14 18:11                 ` Tom Tromey
2020-05-16  0:22                   ` Mike Stump
2020-05-16  0:47                     ` Rob Savoye
2020-05-15  1:50                 ` Jacob Bachmeyer
2020-05-14 23:34             ` Maciej W. Rozycki
2020-05-15  0:33               ` Rob Savoye
2020-05-16 23:45                 ` Maciej W. Rozycki
2020-05-17  3:30                   ` Siddhesh Poyarekar
2020-05-17  3:48                   ` Rob Savoye
2020-05-17  4:09                     ` Andrew Pinski
2020-05-17 19:43                     ` Maciej W. Rozycki
2020-05-17 19:55                       ` Rob Savoye
2020-05-27  0:55                         ` Rob Savoye
2020-05-27  1:20                           ` Maciej W. Rozycki
2020-05-27  1:55                             ` Rob Savoye
2020-06-09 20:12                               ` Maciej W. Rozycki
2020-06-10  2:33                                 ` Jacob Bachmeyer
2020-06-10  4:18                                   ` dejagnu version update? [CORRECTION: not a regression in DejaGnu; GDB testsuite bug] Jacob Bachmeyer
2020-06-10 16:37                                     ` Maciej W. Rozycki
2020-06-11  2:43                                       ` GDB testsuite overrides default_target_compile and breaks Jacob Bachmeyer
2020-06-12 16:28                               ` dejagnu version update? Christophe Lyon
2020-05-14 15:46           ` Maciej W. Rozycki
2020-05-14  6:44     ` Christophe Lyon
2020-05-14  8:45       ` Jonathan Wakely
2020-05-13 18:20   ` Rob Savoye

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=87zhac871g.fsf@euler.schwinge.homeip.net \
    --to=thomas@codesourcery.com \
    --cc=dejagnu@gnu.org \
    --cc=gcc@gcc.gnu.org \
    --cc=mikestump@comcast.net \
    --cc=ro@CeBiTec.Uni-Bielefeld.DE \
    /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).