public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew Pinski <pinskia@gmail.com>
To: Mike Stump <mikestump@comcast.net>
Cc: Thomas Preudhomme <thomas.preudhomme@foss.arm.com>,
		Rainer Orth <ro@cebitec.uni-bielefeld.de>,
		"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH, GCC/testsuite] Fix dump-noaddr dumpbase
Date: Mon, 02 Dec 2019 04:52:00 -0000	[thread overview]
Message-ID: <CA+=Sn1mTBP2Dnv0GswMS1Sw2VZSGZBbeUjGBRjKq+PCayx9=dA@mail.gmail.com> (raw)
In-Reply-To: <BA49494B-D6FC-464F-AA51-7992050449C8@comcast.net>

On Tue, Dec 5, 2017 at 11:27 AM Mike Stump <mikestump@comcast.net> wrote:
>
> On Dec 5, 2017, at 11:11 AM, Thomas Preudhomme <thomas.preudhomme@foss.arm.com> wrote:
> >
> > On 05/12/17 17:54, Andrew Pinski wrote:
> >> On Tue, Dec 5, 2017 at 9:50 AM, Thomas Preudhomme
> >> <thomas.preudhomme@foss.arm.com> wrote:
> >>> Hi,
> >>>
> >>> dump-noaddr test FAILS when $tmpdir is not the same as the directory
> >>> where runtest is called from. Note that this does not happen when
> >>> running make check because tmpdir is set to srcdir.
> >>>
> >>> In that case, file mkdir will create the directory in the current
> >>> directory while GCC is invoked from tmpdir and hence -dumpbase look
> >>> for dump1 and dump2 relative to tmpdir. This patch forces dumpbase to
> >>> be relative to tmpdir which will work in all case.
> >>>
> >>> ChangeLog entry is as follows:
> >>>
> >>> *** gcc/testsuite/ChangeLog ***
> >>>
> >>> 2017-12-05  Thomas Preud'homme  <thomas.preudhomme@arm.com>
> >>>
> >>>         * gcc.c-torture/unsorted/dump-noaddr.x (dump_compare): Set dump base
> >>>         relative to tmpdir.
> >>>
> >>> Testing: Successfully ran unsorted.exp via make check and out of tree
> >>> testing using runtest from <path>/test with tmpdir set in
> >>> <path>/test/site.exp to <path>.
> >>>
> >>> Is this ok for stage3?
> >> https://gcc.gnu.org/ml/gcc-patches/2012-06/msg01752.html
> >> I don't remember where this discussion went last time.
> >> Maybe this time there will be a resolution :).
> >
> > FWIW, I agree with Matt, creating the dump in tmpdir makes more sense. I think his patch can be simplified though because the compiler seems to be invoked from tmpdir so it can at least be omitted from the -dumpbase.
>
> Sounds reasonable.  I've added that on top of his patch and checked that in.  Let us know if it works or not.

I finally got around to testing this myself and I had to revert the
second patch of the set which removed $tmpdir from dumpbase option.
Maybe it is the way I run the testsuite out of tree; I have been
running this way since at least 2010 and the code to do the running
existed before I joined Cavium/Marvell.

This is how I run the testsuite (part of the Makefile):
gcc.sum g++.sum gdb.sum:
        rm -f *.gcda
        mkdir -p $(basename $@)
        -$(RUNTEST) --tool $(basename $@) TMPDIR=`pwd`/$(basename $@)
$(DGFLAGS) \
          --srcdir $(SRC)/$(subst g++,gcc,$(basename $@))/testsuite \
          HOSTCC=gcc HOSTCFLAGS=

I don't "cd TMPDIR" before invoking runtest though so I wonder being
in the TMPDIR is always true because of that.

Thanks,
Andrew Pinski



Thanks,
Andrew Pinski

  parent reply	other threads:[~2019-12-02  4:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-05 17:50 Thomas Preudhomme
2017-12-05 17:54 ` Andrew Pinski
2017-12-05 19:11   ` Thomas Preudhomme
2017-12-05 19:27     ` Mike Stump
2017-12-05 20:56       ` Thomas Preudhomme
2017-12-05 21:26         ` Mike Stump
2018-03-01 16:41           ` Thomas Preudhomme
2019-12-02  4:52       ` Andrew Pinski [this message]
2017-12-05 19:25   ` Mike Stump
2022-11-10  3:00 ` Andrew Pinski

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='CA+=Sn1mTBP2Dnv0GswMS1Sw2VZSGZBbeUjGBRjKq+PCayx9=dA@mail.gmail.com' \
    --to=pinskia@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=mikestump@comcast.net \
    --cc=ro@cebitec.uni-bielefeld.de \
    --cc=thomas.preudhomme@foss.arm.com \
    /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).