changeset 8606:a83c37b17639

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.
author Bruno Haible <bruno@clisp.org>
date Sat, 31 Mar 2007 21:04:26 +0000
parents 414a0a3d5fac
children 6a710ab46914
files ChangeLog tests/test-stat-time.c
diffstat 2 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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.
--- a/tests/test-stat-time.c
+++ b/tests/test-stat-time.c
@@ -84,12 +84,12 @@
   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 @@
   signal (SIGTERM, cleanup);
 #endif
 
+  cleanup (0);
   prepare_test (statinfo, modtimes);
   test_mtime (statinfo, modtimes);
   test_birthtime (statinfo, modtimes, birthtimes);