summaryrefslogtreecommitdiff
path: root/tests/truncate.at
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2018-12-28 13:17:44 +0200
committerSergey Poznyakoff <gray@gnu.org>2018-12-28 13:27:02 +0200
commite7cd377f7801d42aa8e07addff93d2150666c237 (patch)
treee2a7c118bde14224e96e604e925d65448ab96fc3 /tests/truncate.at
parentc15c42ccd1e2377945fd0414eca1a49294bff454 (diff)
downloadtar-e7cd377f7801d42aa8e07addff93d2150666c237.tar.gz
Implement the "wait" checkpoint action.
This action instructs tar to pause until given signal is delivered. The newer genfile tool uses this action for communication between genfile and tar in exec mode. This eliminates race conitions and speeds up the tests based on exec mode. * doc/tar.texi: Document changes. * paxutils: Upgrade. * src/checkpoint.c: Implement the wait action. * src/common.h (decode_signal): New proto. * src/tar.c (decode_signal): New function. (set_stat_signal): Rewrite. * tests/dirrem01.at: Adjust genfile and tar command line arguments to use the new feature. * tests/dirrem02.at: Likewise. * tests/filerem01.at: Likewise. * tests/filerem02.at: Likewise. * tests/grow.at: Likewise. * tests/sptrcreat.at: Likewise. * tests/sptrdiff00.at: Likewise. * tests/sptrdiff01.at: Likewise. * tests/truncate.at: Likewise.
Diffstat (limited to 'tests/truncate.at')
-rw-r--r--tests/truncate.at10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/truncate.at b/tests/truncate.at
index a743e4b7..7bd1443d 100644
--- a/tests/truncate.at
+++ b/tests/truncate.at
@@ -1,7 +1,7 @@
# Process this file with autom4te to create testsuite. -*- Autotest -*-
# Test suite for GNU tar.
-# Copyright 2005, 2007, 2013-2014, 2016-2017 Free Software Foundation,
+# Copyright 2005, 2007, 2013-2014, 2016-2018 Free Software Foundation,
# Inc.
# This file is part of GNU tar.
@@ -33,18 +33,18 @@ AT_KEYWORDS([truncate filechange])
AT_TAR_CHECK([
genfile --file foo --length 200k
genfile --file baz
-genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
+genfile --run --checkpoint 10 --length 195k --truncate foo -- \
+ tar -vcf bar foo baz
echo Exit status: $?
echo separator
genfile --file foo --seek 195k --length 5k --pattern=zeros
-tar dvf bar],
-[1],
+tar dvf bar|sed '/foo: Mod time differs/d'],
+[0],
[foo
baz
Exit status: 1
separator
foo
-foo: Mod time differs
baz
],
[tar: foo: File shrank by 5120 bytes; padding with zeros