Sergey, Here's a patch to tests/truncate.at for its inherent yet undesirable race condition to be less likely triggered, and to use less disk space (2 MB instead of 500 MB). The patch is against 1.23, but it appears to be relevant and valid for 1.25 as well.
--- tar-1.23.orig/tests/truncate.at 2010-01-26 11:30:21 +0000 +++ tar-1.23/tests/truncate.at 2010-12-04 05:38:58 +0000 @@ -30,13 +30,12 @@ AT_KEYWORDS([truncate filechange]) AT_TAR_CHECK([ -genfile --file foo --length 50000k +genfile --file foo --length 200k genfile --file baz -genfile --run --checkpoint 10 --length 49995k --truncate foo -- tar --checkpoint -vcf bar foo baz +genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz echo Exit status: $? echo separator -sleep 1 -genfile --file foo --seek 49995k --length 5k --pattern=zeros +genfile --file foo --seek 195k --length 5k --pattern=zeros tar dvf bar], [1], [foo Without this patch, our package of tar sometimes fails to build (we run tests on package builds). Here's how the test fails (before the patch): --- - 2010-12-04 08:06:08 +0300 +++ /usr/src/world/t/tar-1.23/tests/testsuite.dir/at-stderr 2010-12-04 08:06:08 +0300 @@ -1,2 +1 @@ -tar: foo: File shrank by 5120 bytes; padding with zeros --- - 2010-12-04 08:06:08 +0300 +++ /usr/src/world/t/tar-1.23/tests/testsuite.dir/at-stdout 2010-12-04 08:06:08 +0300 @@ -1,8 +1,9 @@ foo baz -Exit status: 1 +Exit status: 0 separator foo foo: Mod time differs +foo: Contents differ baz The above test failure was for my test build of clean 1.23 (without any of our patches), but on the same system that sometimes exhibits the problem building the package. I had to run "make check" several times to trigger the problem. Alexander
