浏览代码

* tests/truncate.at: Create files whose time stamps must fall on
1-second boundaries. This prevents tests from failing on hosts
like Solaris 8 that have nanosecond-resolution file time stamps.
* tests/update.at: Likewise.

Paul Eggert 19 年之前
父节点
当前提交
cfbf693855
共有 2 个文件被更改,包括 4 次插入2 次删除
  1. 2 1
      tests/truncate.at
  2. 2 1
      tests/update.at

+ 2 - 1
tests/truncate.at

@@ -31,7 +31,8 @@ AT_KEYWORDS([truncated files])
 AT_TAR_CHECK([
 genfile --file foo --length 50000k
 genfile --file baz
-genfile --run 'tar -H pax -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
+touch -t 197001030000 baz # avoid subsecond resolution
+genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
 echo separator
 sleep 1
 dd if=/dev/zero of=foo bs=1k seek=49995 count=5 >/dev/null 2>&1

+ 2 - 1
tests/update.at

@@ -31,8 +31,9 @@ AT_TAR_CHECK([
 mkdir directory
 genfile --length 10240 --pattern zeros --file directory/file1
 genfile --length 10240 --pattern default --file directory/file2
+touch -t 197001030000 directory directory/* # avoid subsecond resolution
 
-tar -H pax -cf archive directory || exit 1
+tar cf archive directory || exit 1
 echo separator
 tar uf archive directory || exit 1
 echo separator