]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Remove sleep()s in Test; Replace with Artificial mtime 2742/head
authorW. Felix Handte <w@felixhandte.com>
Wed, 4 Aug 2021 19:53:37 +0000 (15:53 -0400)
committerW. Felix Handte <w@felixhandte.com>
Wed, 4 Aug 2021 19:56:46 +0000 (15:56 -0400)
This behavior of `touch` is standardized in POSIX, so it should be available.

tests/playTests.sh

index d108d5d8e96f808cd1a02312c65c56cb7e02c6ce..d83001fee49532f4da1077947cd33b4538720102 100755 (executable)
@@ -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