Bug 28123 - gcc.dg/cpp/_Pragma3.c is sensitive to timestamps when using from git
Summary: gcc.dg/cpp/_Pragma3.c is sensitive to timestamps when using from git
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: testsuite (show other bugs)
Version: 4.2.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: documentation
Depends on:
Blocks: 29842
  Show dependency treegraph
 
Reported: 2006-06-21 14:53 UTC by Jorn Wolfgang Rennecke
Modified: 2021-06-04 00:06 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2021-06-03 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jorn Wolfgang Rennecke 2006-06-21 14:53:42 UTC
I got a failure on the cc.dg/cpp/_Pragma3.c test:

Executing on host: /mnt/scratch/nightly/2006-06-20/sh-elf/gcc/xgcc -B/mnt/scratch/nightly/2006-06-20/sh-elf/gcc/ /mnt/scratch/nightly/2006-06-20/srcw/gcc/testsuite/gcc.dg/cpp/_Pragma3.c    -ansi -pedantic-errors -DSTACK_SIZE=16384 -fno-show-column -E  -isystem /mnt/scratch/nightly/2006-06-20/sh-elf/sh-elf/./newlib/targ-include -isystem /mnt/scratch/nightly/2006-06-20/srcw/newlib/libc/include   -o _Pragma3.i    (timeout = 300)
/mnt/scratch/nightly/2006-06-20/srcw/gcc/testsuite/gcc.dg/cpp/_Pragma3.c:11: warning: current file is older than mi1c.h^M
output is:
/mnt/scratch/nightly/2006-06-20/srcw/gcc/testsuite/gcc.dg/cpp/_Pragma3.c:11: warning: current file is older than mi1c.h^M

FAIL: gcc.dg/cpp/_Pragma3.c (test for excess errors)
Excess errors:
/mnt/scratch/nightly/2006-06-20/srcw/gcc/testsuite/gcc.dg/cpp/_Pragma3.c:11: warning: current file is older than mi1c.h

The timestamps of the two files in question are one second apart:
bash-2.05b$ ls -l --full-time _Pragma3.c mi1c.h
-rw-r--r--    1 renneckej users         214 2006-06-20 14:36:46.000000000 +0100 mi1c.h
-rw-r--r--    1 renneckej users         309 2006-06-20 14:36:45.000000000 +0100 _Pragma3.c

It would appear that this tests success requires that either _Pragma3.c is checked out after mi1c.h, or both are checked out simultanously as far as the file system is concerned.
Comment 1 Richard Biener 2006-06-21 15:02:45 UTC
Confirmed.
Comment 2 jsm-csl@polyomino.org.uk 2006-06-21 15:14:47 UTC
Subject: Re:   New: gcc.dg/cpp/_Pragma3.c is sensitive
 to timestamps

On Wed, 21 Jun 2006, amylaar at gcc dot gnu dot org wrote:

> It would appear that this tests success requires that either _Pragma3.c is
> checked out after mi1c.h, or both are checked out simultanously as far as the
> file system is concerned.

You're meant to use contrib/gcc_update to adjust the timestamps.

Comment 3 Andrew Pinski 2006-06-21 15:18:32 UTC
# Without this, _Pragma3.c can have a false negative.
gcc/testsuite/gcc.dg/cpp/_Pragma3.c: gcc/testsuite/gcc.dg/cpp/mi1c.h
Comment 4 Andrew Pinski 2006-06-21 15:19:17 UTC
(In reply to comment #3)
> # Without this, _Pragma3.c can have a false negative.
> gcc/testsuite/gcc.dg/cpp/_Pragma3.c: gcc/testsuite/gcc.dg/cpp/mi1c.h

Just add some more, that was in contrib/gcc_update.
Comment 5 Jorn Wolfgang Rennecke 2006-06-22 15:36:20 UTC
(In reply to comment #2)
 
> You're meant to use contrib/gcc_update to adjust the timestamps.
> 

I see nothing in our download or testing documentation suggesting that that
is required after a clean svn checkout.  Also, the blurb at the top of
gcc_update only indicates that this is neeeded when you lack some maintaner tools.
So if it is required now to run gcc_update before testing, we should add that to
our documentation.
Comment 6 Andrew Pinski 2006-06-22 16:01:29 UTC
Documentation is not part of web.
Comment 7 Andrew Pinski 2021-06-04 00:06:00 UTC
The released tar file will always be correct:
  # Run gcc_update on them to set up the timestamps nicely, and (re)write
  # the LAST_UPDATED file containing the git tag/revision used.
  changedir "gcc-${RELEASE}"
  contrib/gcc_update --touch
  echo "Obtained from git: ${GITBRANCH} revision ${GITREV}" > LAST_UPDATED


So this is more about only when building from git.