2007-03-30 James Youngman <jay@gnu.org>
authorBruno Haible <bruno@clisp.org>
Sat, 31 Mar 2007 21:04:26 +0000 (21:04 +0000)
committerBruno Haible <bruno@clisp.org>
Sat, 31 Mar 2007 21:04:26 +0000 (21:04 +0000)
        * 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.

ChangeLog
tests/test-stat-time.c

index 78287bc..d469ba8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-03-30  James Youngman  <jay@gnu.org>
+
+       * 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.
+
 2007-03-31  Bruno Haible  <bruno@clisp.org>
 
        Support old proprietary implementations of iconv.
index 0f78886..bf3e8df 100644 (file)
@@ -84,12 +84,12 @@ prepare_test (struct stat *statinfo, struct timespec *modtimes)
   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);