public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, GCC/testsuite] Fix dump-noaddr dumpbase
@ 2017-12-05 17:50 Thomas Preudhomme
  2017-12-05 17:54 ` Andrew Pinski
  2022-11-10  3:00 ` Andrew Pinski
  0 siblings, 2 replies; 10+ messages in thread
From: Thomas Preudhomme @ 2017-12-05 17:50 UTC (permalink / raw)
  To: Rainer Orth, Mike Stump, gcc-patches

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

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?

Best regards,

Thomas

[-- Attachment #2: fix_dump-noaddr_dumpbase.patch --]
[-- Type: text/x-patch, Size: 1308 bytes --]

diff --git a/gcc/testsuite/gcc.c-torture/unsorted/dump-noaddr.x b/gcc/testsuite/gcc.c-torture/unsorted/dump-noaddr.x
index d14d494570944b2be82c2575204cdbf4b15721ca..68d6c3e38325cabbdd280ecf05e663dbcda99900 100644
--- a/gcc/testsuite/gcc.c-torture/unsorted/dump-noaddr.x
+++ b/gcc/testsuite/gcc.c-torture/unsorted/dump-noaddr.x
@@ -11,10 +11,10 @@ proc dump_compare { src options } {
     foreach option $option_list {
 	file delete -force dump1
 	file mkdir dump1
-	c-torture-compile $src "$option $options -dumpbase dump1/$dumpbase -DMASK=1 -x c --param ggc-min-heapsize=1 -fdump-ipa-all -fdump-rtl-all -fdump-tree-all -fdump-noaddr"
+	c-torture-compile $src "$option $options -dumpbase [pwd]/dump1/$dumpbase -DMASK=1 -x c --param ggc-min-heapsize=1 -fdump-ipa-all -fdump-rtl-all -fdump-tree-all -fdump-noaddr"
 	file delete -force dump2
 	file mkdir dump2
-	c-torture-compile $src "$option $options -dumpbase dump2/$dumpbase -DMASK=2 -x c -fdump-ipa-all -fdump-rtl-all -fdump-tree-all -fdump-noaddr"
+	c-torture-compile $src "$option $options -dumpbase [pwd]/dump2/$dumpbase -DMASK=2 -x c -fdump-ipa-all -fdump-rtl-all -fdump-tree-all -fdump-noaddr"
 	foreach dump1 [lsort [glob -nocomplain dump1/*]] {
 	    regsub dump1/ $dump1 dump2/ dump2
 	    set dumptail "gcc.c-torture/unsorted/[file tail $dump1]"

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-11-10  3:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-05 17:50 [PATCH, GCC/testsuite] Fix dump-noaddr dumpbase 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
2017-12-05 19:25   ` Mike Stump
2022-11-10  3:00 ` Andrew Pinski

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).