From: Michihiro NAKAJIMA Date: Wed, 18 Jan 2012 05:21:24 +0000 (-0500) Subject: Usinsg assertUtimes changes ctime, we have to wait a minute between performing assert... X-Git-Tag: v3.0.4~2^2~178 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3edcf429772f4b8d56adfd17390c5569495abd1e;p=thirdparty%2Flibarchive.git Usinsg assertUtimes changes ctime, we have to wait a minute between performing assertUtimes. SVN-Revision: 4167 --- diff --git a/libarchive/test/test_archive_matching_time.c b/libarchive/test/test_archive_matching_time.c index e02f6cf76..b110e6382 100644 --- a/libarchive/test/test_archive_matching_time.c +++ b/libarchive/test/test_archive_matching_time.c @@ -147,7 +147,9 @@ test_newer_than_file_mbs(void) return; } assertUtimes("old", 10002, 0, 10002, 0); + sleepUntilAfter(time(NULL)); assertUtimes("mid", 10001, 0, 10001, 0); + sleepUntilAfter(time(NULL)); assertUtimes("new", 10000, 0, 10000, 0); assertEqualIntA(m, 0, archive_matching_newer_ctime_than(m, "mid")); @@ -255,7 +257,9 @@ test_newer_than_file_wcs(void) return; } assertUtimes("old", 10002, 0, 10002, 0); + sleepUntilAfter(time(NULL)); assertUtimes("mid", 10001, 0, 10001, 0); + sleepUntilAfter(time(NULL)); assertUtimes("new", 10000, 0, 10000, 0); assertEqualIntA(m, 0, archive_matching_newer_ctime_than_w(m, L"mid")); @@ -414,7 +418,9 @@ test_older_than_file_mbs(void) return; } assertUtimes("old", 10002, 0, 10002, 0); + sleepUntilAfter(time(NULL)); assertUtimes("mid", 10001, 0, 10001, 0); + sleepUntilAfter(time(NULL)); assertUtimes("new", 10000, 0, 10000, 0); assertEqualIntA(m, 0, archive_matching_older_ctime_than(m, "mid")); @@ -522,7 +528,9 @@ test_older_than_file_wcs(void) return; } assertUtimes("old", 10002, 0, 10002, 0); + sleepUntilAfter(time(NULL)); assertUtimes("mid", 10001, 0, 10001, 0); + sleepUntilAfter(time(NULL)); assertUtimes("new", 10000, 0, 10000, 0); assertEqualIntA(m, 0, archive_matching_older_ctime_than_w(m, L"mid"));