diff options
author | Bruno Haible <bruno@clisp.org> | 2007-03-31 21:04:26 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2007-03-31 21:04:26 +0000 |
commit | a03613b6836443ac6ac2fa8b2037a1b6644dcc4c (patch) | |
tree | e5f674618d8658aca1333fdadd19fc1fcafe0261 /tests/test-stat-time.c | |
parent | 2ec42242c58ea05c1d31ff199d8436420049e189 (diff) | |
download | gnulib-a03613b6836443ac6ac2fa8b2037a1b6644dcc4c.tar.gz |
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.
Diffstat (limited to 'tests/test-stat-time.c')
-rw-r--r-- | tests/test-stat-time.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test-stat-time.c b/tests/test-stat-time.c index 0f78886e62..bf3e8dfe36 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); |