[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnulib support for st_birthtime (second revision of patch)
From: |
James Youngman |
Subject: |
Re: gnulib support for st_birthtime (second revision of patch) |
Date: |
Fri, 30 Mar 2007 00:25:06 +0100 |
On 3/29/07, Bruno Haible <address@hidden> wrote:
On AIX 5.1, with gnulib as of today (29 March) the test-stat-time test fails.
More precisely, on a 'jfs2' file system, the test fails in the third ASSERT
of test_mtime. I get these time stamps:
[...]
I can see two ways to fix the test:
- Turn this ASSERT into an 'if' that does appropriate action if not fulfilled.
- Immediately after renaming the file, write something into it, so that also
on this weird filesystem the ctime is bumped.
Does the following patch fix the problem?
2007-03-30 James Youngman <address@hidden>
* tests/test-stat-time.c (prepare_test): use chmod() rather than
rename() to change the ctime of a file (because ctime is
unaffected by rename on jfs2 on AIX 5.1).
(main): Start by doing cleanup, in case a previous run failed
leaving test files behind.
Index: test-stat-time.c
===================================================================
RCS file: /sources/gnulib/gnulib/tests/test-stat-time.c,v
retrieving revision 1.3
diff -u -p -r1.3 test-stat-time.c
--- test-stat-time.c 27 Mar 2007 18:51:18 -0000 1.3
+++ test-stat-time.c 29 Mar 2007 23:22:18 -0000
@@ -84,12 +84,12 @@ prepare_test (struct stat *statinfo, str
sleep (2);
create_file ("t-stt-stamp2");
sleep (2);
- ASSERT (rename ("t-stt-testfile", "t-stt-renamed") == 0);
+ ASSERT (chmod ("t-stt-testfile", 0400) == 0);
sleep (2);
create_file ("t-stt-stamp3");
do_stat ("t-stt-stamp1", &statinfo[0]);
- do_stat ("t-stt-renamed", &statinfo[1]);
+ do_stat ("t-stt-testfile", &statinfo[1]);
do_stat ("t-stt-stamp2", &statinfo[2]);
do_stat ("t-stt-stamp3", &statinfo[3]);
@@ -164,6 +164,7 @@ main ()
signal (SIGTERM, cleanup);
#endif
+ cleanup (0);
prepare_test (statinfo, modtimes);
test_mtime (statinfo, modtimes);
test_birthtime (statinfo, modtimes, birthtimes);
- gnulib support for st_birthtime (second revision of patch), James Youngman, 2007/03/27
- Re: gnulib support for st_birthtime (second revision of patch), Bruno Haible, 2007/03/27
- Re: gnulib support for st_birthtime (second revision of patch), James Youngman, 2007/03/27
- Re: gnulib support for st_birthtime (second revision of patch), Bruno Haible, 2007/03/27
- Re: gnulib support for st_birthtime (second revision of patch), Eric Blake, 2007/03/27
- Re: gnulib support for st_birthtime (second revision of patch), Paul Eggert, 2007/03/27
- Re: gnulib support for st_birthtime (second revision of patch), Eric Blake, 2007/03/27
- Re: gnulib support for st_birthtime (second revision of patch), James Youngman, 2007/03/28
- Re: gnulib support for st_birthtime (second revision of patch), Paul Eggert, 2007/03/29
- Re: gnulib support for st_birthtime (second revision of patch), Bruno Haible, 2007/03/29
- Re: gnulib support for st_birthtime (second revision of patch),
James Youngman <=
- Re: gnulib support for st_birthtime (second revision of patch), Bruno Haible, 2007/03/31
- Re: gnulib support for st_birthtime (second revision of patch), Bruno Haible, 2007/03/29
Re: gnulib support for st_birthtime (second revision of patch), Jim Meyering, 2007/03/27