From: Bruno Haible Date: Sat, 31 Mar 2007 21:04:26 +0000 (+0000) Subject: 2007-03-30 James Youngman X-Git-Tag: cvs-readonly~612 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;h=a03613b6836443ac6ac2fa8b2037a1b6644dcc4c;p=gnulib.git 2007-03-30 James Youngman * 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. --- diff --git a/ChangeLog b/ChangeLog index 78287bc93..d469ba8fe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-03-30 James Youngman + + * 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 Support old proprietary implementations of iconv. diff --git a/tests/test-stat-time.c b/tests/test-stat-time.c index 0f78886e6..bf3e8dfe3 100644 --- a/tests/test-stat-time.c +++ b/tests/test-stat-time.c @@ -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);