]> Dogcows Code - chaz/tar/commitdiff
tests: port to NFS file servers with clock skew
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 16 Oct 2010 04:52:40 +0000 (21:52 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 16 Oct 2010 04:53:37 +0000 (21:53 -0700)
Several of the tests assumed that a newly created file cannot
have a time stamp dated in the future.  This assumption is not
true when files are served by a remote host whose clock is
slightly in advance of ours.  Fix the problems that I observed
when running "make check" a couple of times on such a server.

* tests/backup01.at: Use --warning=no-timestamp to suppress
clock-skew warnings.
* tests/chtype.at, tests/comprec.at, tests/exclude06.at:
* tests/extrac01.at, tests/extrac03.at, tests/extrac05.at:
* tests/extrac06.at, tests/extrac08.at, tests/extrac13.at:
* tests/extrac14.at, tests/incr01.at, tests/incr03.at, tests/link01.at:
* tests/multiv01.at, tests/multiv02.at, tests/multiv03.at:
* tests/pipe.at, tests/rename02.at, tests/rename03.at:
* tests/rename05.at, tests/same-order01.at, tests/same-order02.at:
* tests/sparse01.at:
Likewise.

24 files changed:
tests/backup01.at
tests/chtype.at
tests/comprec.at
tests/exclude06.at
tests/extrac01.at
tests/extrac03.at
tests/extrac05.at
tests/extrac06.at
tests/extrac08.at
tests/extrac13.at
tests/extrac14.at
tests/incr01.at
tests/incr03.at
tests/link01.at
tests/multiv01.at
tests/multiv02.at
tests/multiv03.at
tests/pipe.at
tests/rename02.at
tests/rename03.at
tests/rename05.at
tests/same-order01.at
tests/same-order02.at
tests/sparse01.at

index 538dd3d9fc8141844e6e0d36b1da353f25561c7c..83d1bea00b92c0981d7270eee5e22cb0404a9cb9 100644 (file)
@@ -37,7 +37,7 @@ AT_TAR_CHECK([
 mkdir dir1 dir2
 echo bla > dir1/file1
 tar cf test.tar dir1 dir2
-tar xfv test.tar --backup
+tar xfv test.tar --backup --warning=no-timestamp
 ],
 [0],
 [dir1/
@@ -46,4 +46,4 @@ Renaming `dir1/file1' to `dir1/file1~'
 dir2/
 ])
 
-AT_CLEANUP
\ No newline at end of file
+AT_CLEANUP
index 9b806c020b8d6841aec4cd2752dbdf6aeff33ce1..1ba86b3bd9f6272e12431d15f18abb9b9ffb85f1 100644 (file)
@@ -51,9 +51,9 @@ tar --create --file=archive.2 --listed-incremental=db.2 directory
 rm -r directory
 
 echo Restore archive.1
-tar -xf archive.1 --listed-incremental=/dev/null
+tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp
 echo Restore archive.2
-tar -xf archive.2 --listed-incremental=/dev/null
+tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp
 find directory | sort
 ],
 [0],
index cd56a20c34585aff9d1933f41399e47a9e03b7aa..f2d01413751f70e8e2bb57e3f2517c98edc49fcf 100644 (file)
@@ -29,7 +29,7 @@ echo "separator"
 tar cfz archive file1
 echo "separator"
 mv file1 orig
-tar xfv archive
+tar xfv archive --warning=no-timestamp
 cmp orig file1
 ],
 [0],
index 3fef892bd3faa61eac83f0e614d00d81b5ca404c..b1c0da7f88a52d6c1b78eeb6c1ea7613fde247c8 100644 (file)
@@ -33,7 +33,7 @@ genfile --length 20 -f test_base_dir[/1.c]
 
 tar cf archive.tar test_base_dir
 mkdir out
-tar -C out -xf archive.tar --exclude='*.txt'
+tar -C out -xf archive.tar --exclude='*.txt' --warning=no-timestamp
 find out -type f
 ],
 [0],
index 5b1a2de2856027ab9f73cb55c92f56d24e2e43e0..c84c63a52aae5c0de7092267eadd886088019f21 100644 (file)
@@ -27,7 +27,7 @@ AT_TAR_CHECK([
 mkdir directory
 touch directory/file
 tar cf archive directory || exit 1
-tar xf archive || exit 1
+tar xf archive --warning=no-timestamp || exit 1
 ])
 
 AT_CLEANUP
index 9566b5ee7d1d53dead40d67afae3d8d6c08bd388..ad01752a52f78bf230f6b9292cd1bcff1746ddd0 100644 (file)
@@ -27,7 +27,7 @@ AT_TAR_CHECK([
 mkdir directory
 tar -cPvf archive directory/../directory
 echo separator
-tar -xPvf archive],
+tar -xPvf archive --warning=no-timestamp],
 [0],
 [directory/../directory/
 separator
index 3e0e9863c673ad8b2acc9ae2e856258de06516a8..5401001ca6d936c031c58a2aa6b38d559fc5795b 100644 (file)
@@ -47,7 +47,7 @@ tar cf archive jeden dwa trzy cztery || exit 1
 mkdir dir
 cd dir
 
-tar xvfT ../archive ../../list || exit 1
+tar xvfT ../archive ../../list --warning=no-timestamp || exit 1
 
 cd ..
 ],
index d7e807d090ab3ff1e7970514a5a64d169189caf0..35cb221f36feaf04c3568f91ec39373fc97268a2 100644 (file)
@@ -54,10 +54,10 @@ chmod 755 directory
 genfile --stat=mode:777 directory
 
 # ... and attempt to restore it twice
-tar xf arc directory
+tar xf arc directory --warning=no-timestamp
 genfile --stat=mode:777 directory
 
-tar xf arc directory
+tar xf arc directory --warning=no-timestamp
 genfile --stat=mode:777 directory
 
 # After both restores, the directory mode should be 755
index 6ca33bddebe51471b0194c878cc1620938047e19..432aa0b8e4c62f0708d943ac29a089169db3093c 100644 (file)
@@ -40,7 +40,7 @@ chmod 755 dir
 echo bla > dir/file
 tar cf test.tar dir
 chmod 700 dir
-tar xfv test.tar
+tar xfv test.tar --warning=no-timestamp
 genfile --stat=mode.777 dir
 ],
 [0],
@@ -49,4 +49,4 @@ dir/file
 755
 ])
 
-AT_CLEANUP
\ No newline at end of file
+AT_CLEANUP
index 2f950cbabe82a3a133336ba8dc8ca65e29951ae8..2abed72fa5fa143f71eed9897bc4c942f45982f8 100644 (file)
@@ -32,19 +32,19 @@ echo target1 >dst1/target1
 echo target1 >target1
 
 tar -cf archive.tar -C src . &&
-tar -xf archive.tar -C dst1 &&
+tar -xf archive.tar -C dst1 --warning=no-timestamp &&
 diff -c src/file1 dst1/file1 &&
 diff -c target1 dst1/target1
 
 ln -s target1 dst2/file1
 echo target1 >dst2/target1
-tar --overwrite -xf archive.tar -C dst2 &&
+tar --overwrite -xf archive.tar -C dst2 --warning=no-timestamp &&
 diff -c src/file1 dst2/file1 &&
 diff -c target1 dst2/target1
 
 ln -s target1 dst3/file1
 echo target1 >dst3/target1
-tar --overwrite -xhf archive.tar -C dst3 &&
+tar --overwrite -xhf archive.tar -C dst3 --warning=no-timestamp &&
 diff -c src/file1 dst3/file1 &&
 diff -c src/file1 dst3/target1
 ],
index 1cfaa5c3bfe17224d2b745adc18ab4536d002bbc..b98c39543f98b36cc07ac3b5e27f4afb6323791a 100644 (file)
@@ -28,7 +28,7 @@ mkdir dest
 ln -s dest symlink
 echo foo >foo
 tar -cf archive.tar foo &&
-tar -xf archive.tar -C symlink &&
+tar -xf archive.tar -C symlink --warning=no-timestamp &&
 cmp foo dest/foo
 ],
 [0],[],[],[],[],[gnu])
index ce2d04734eb265a97e99368b10dea02413a7429b..fad8d3e4c08dc57360333ae93e35a43408e78576 100644 (file)
@@ -37,9 +37,9 @@ tar -cf archive.1 -g db directory
 
 mv directory orig
 
-tar xvfg archive.0 /dev/null
+tar xvfg archive.0 /dev/null --warning=no-timestamp
 echo separator
-tar xvfg archive.1 /dev/null
+tar xvfg archive.1 /dev/null --warning=no-timestamp
 ],
 [0],
 [directory/
index 113793ad30674bb2816e1933092c664605806b7a..287e1ee185e31276b80cf4fddd38339335f4779c 100644 (file)
@@ -50,11 +50,11 @@ echo Listing of archive.2
 tar -tf archive.2 | sort
 
 echo Directory after first restore
-tar -xf archive.1 -g db
+tar -xf archive.1 -g db --warning=no-timestamp
 find directory | sort
 
 echo Directory after second restore
-tar -xf archive.2 -g db
+tar -xf archive.2 -g db --warning=no-timestamp
 find directory | sort
 ],
 [0],
index 5faf42e0a2e050af1d2c2da99a46eb32d7db19b7..e5f7d5588805513ae7241b2ae405c4db575cbaed 100644 (file)
@@ -44,7 +44,7 @@ ln directory/test1/test.txt directory/test2/test.txt || AT_SKIP_TEST
 tar cf archive directory/test1/test.txt directory/test1/test.txt
 
 rm -r directory
-tar xf archive
+tar xf archive --warning=no-timestamp
 
 ls directory/test1
 ],
index de75da10552387adcd6b3844abb8366896b69eac..2b03b324fce526705da09bef06be1d29669cbe4c 100644 (file)
@@ -51,7 +51,7 @@ tar -c --multi-volume --tape-length=$TAPE_LENGTH \
 mkdir extract-dir-pipe
 dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
 PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \
-      -C extract-dir-pipe -x --multi-volume \
+      -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \
       --tape-length=$TAPE_LENGTH --read-full-records || exit 1
 
 cmp file1 extract-dir-pipe/file1
index 7dfee1afe67851348b41af72887bf960399e615f..0c321e2c0b1921f96fe2fdf7df1dc34162314d2a 100644 (file)
@@ -38,7 +38,7 @@ exec <&-
 
 tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
 echo separator
-tar -v -x -f A.tar -f B.tar -f C.tar -M en || exit 1
+tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1
 ],
 [0],
 [separator
index aa4274f6e957e159db2c72e5e8075dccaffab744..e013c190c8e098a4eb750b4ae2a36be891aad5a2 100644 (file)
@@ -59,7 +59,7 @@ tar -M -L 10 -c -f arch.1 -f arch.2 $BFILE || exit 1
 
 echo separator-2
 mv $BFILE bfile
-tar -M -x -f arch.1 -f arch.2 || exit 1
+tar -M -x -f arch.1 -f arch.2 --warning=no-timestamp || exit 1
 cmp $BFILE bfile
 ],
 [0],
index 833e1342992811cd852985596fc2ed1bdfd88e6d..cab85351c9560eb3c278bf83fe2ec2165d673460 100644 (file)
@@ -39,7 +39,7 @@ genfile --length 10240 --pattern zeros --file directory/file1
 genfile --length 13 --file directory/file2
 tar cf archive directory
 mv directory orig
-cat archive | tar xfv - | sort
+cat archive | tar xfv - --warning=no-timestamp | sort
 echo "separator"
 cmp orig/file1 directory/file1
 echo "separator"
index 6cadee304e1c48d1837e144bf8e36bfd44cba21d..4c51f26984acbed5f0e63f7618b7f206743868a5 100644 (file)
@@ -46,14 +46,14 @@ tar -g incr -cf arch.2 -v foo
 
 mv foo old
 
-tar xfg arch.1 /dev/null 2>tmperr
+tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr
 sort tmperr >&2
 
 echo "Begin directory listing 1"
 find foo | sort
 echo "End directory listing 1"
 
-tar xfgv arch.2 /dev/null
+tar xfgv arch.2 /dev/null --warning=no-timestamp
 echo Begin directory listing 2
 find foo | sort
 echo End directory listing 2
index 6dec2e2d27396a705c8c7c702faf54dd3313fc6d..d6d9a27398db01fe8a52172890ef601a400ba8a4 100644 (file)
@@ -58,13 +58,13 @@ echo "Second dump" >&2
 tar -g incr -cf arch.2 -v foo 2>tmperr
 sort tmperr >&2
 
-tar xfg arch.1 /dev/null
+tar xfg arch.1 /dev/null --warning=no-timestamp
 
 echo "Begin directory listing 1"
 find foo | sort
 echo "End directory listing 1"
 
-tar xfgv arch.2 /dev/null
+tar xfgv arch.2 /dev/null --warning=no-timestamp
 echo Begin directory listing 2
 find foo | sort
 echo End directory listing 2
index 26d92024bae1ac3c52631c514a5aba12151fefb9..54a9067a14459d7287225ff61854856bb217a5ce 100644 (file)
@@ -46,11 +46,11 @@ tar -cf archive.2 -g db.2 dir
 mv dir orig
 
 decho First restore
-tar -xf archive.1 -g db.1
+tar -xf archive.1 -g db.1 --warning=no-timestamp
 find directory | sort
 
 decho Second restore
-tar -xf archive.2 -g db.2
+tar -xf archive.2 -g db.2 --warning=no-timestamp
 find dir | sort
 ],
 [0],
index a0fd4bf62ca83664f816d5296d041f859c9a959e..2ed46701f983415284b8da5fce973104258b6337 100644 (file)
@@ -34,7 +34,7 @@ genfile -l 1024 -f file2
 tar cf archive file1 file2
 
 mkdir directory
-tar -xf archive --same-order -C directory || exit 1
+tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
 
 ls directory|sort
 ],
index 9538295a48155f4f82f014a56b614d8586ed5591..7beecc3b8bcc424e0c6918484cb3eea502f00cda 100644 (file)
@@ -34,7 +34,9 @@ mkdir en
 mkdir to
 
 HERE=`pwd`
-tar -xf archive --same-order -C $HERE/en file1 -C $HERE/to file2 || exit 1
+tar -xf archive --same-order --warning=no-timestamp \
+  -C $HERE/en file1 \
+  -C $HERE/to file2 || exit 1
 
 ls en
 echo separator
index f7a699409450c495cf04de9406da2795cbbb2c2d..039fbbf2098ce36dc2853d9e4852faf30cb36deb 100644 (file)
@@ -31,7 +31,7 @@ echo separator
 tar tfv archive
 echo separator
 mkdir directory
-tar Cxf directory archive
+tar Cxf directory archive --warning=no-timestamp
 genfile --stat=name,size sparsefile
 cmp sparsefile directory/sparsefile
 ],
This page took 0.037388 seconds and 4 git commands to generate.