From: W. Felix Handte Date: Wed, 4 Aug 2021 19:53:37 +0000 (-0400) Subject: Remove sleep()s in Test; Replace with Artificial mtime X-Git-Tag: v1.5.1~1^2~128^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a8f4612eab1a61da5cbadccacee43a440e8f34c0;p=thirdparty%2Fzstd.git Remove sleep()s in Test; Replace with Artificial mtime This behavior of `touch` is standardized in POSIX, so it should be available. --- diff --git a/tests/playTests.sh b/tests/playTests.sh index d108d5d8e..d83001fee 100755 --- a/tests/playTests.sh +++ b/tests/playTests.sh @@ -597,11 +597,10 @@ fi println "\n===> zstd created file timestamp tests" datagen > tmp -sleep 1 # could also use touch -t but I don't know how portable that is. +touch -m -t 200001010000.00 tmp println "test : copy mtime in file -> file compression " zstd -f tmp -o tmp.zst assertSameMTime tmp tmp.zst -sleep 1 # could also use touch -t but I don't know how portable that is. println "test : copy mtime in file -> file decompression " zstd -f -d tmp.zst -o tmp.out assertSameMTime tmp.zst tmp.out