summaryrefslogtreecommitdiff
path: root/tests/multiv04.at
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2005-04-07 17:28:34 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2005-04-07 17:28:34 +0000
commitee738da4a83c91e517404515c8a331c6ebf71a1e (patch)
tree32a9e0edcf0f025ec217bb8d4bcd694e17aa119b /tests/multiv04.at
parent42e53a98e14a0e9fbac52cde0a2b836640254d16 (diff)
downloadtar-ee738da4a83c91e517404515c8a331c6ebf71a1e.tar.gz
Test splittind directory members between the archive volumes.
Diffstat (limited to 'tests/multiv04.at')
-rw-r--r--tests/multiv04.at68
1 files changed, 68 insertions, 0 deletions
diff --git a/tests/multiv04.at b/tests/multiv04.at
new file mode 100644
index 00000000..2f1cb85b
--- /dev/null
+++ b/tests/multiv04.at
@@ -0,0 +1,68 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# Copyright (C) 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# Problem: Tar was not able to match directory name if the directory
+# member was split between two volumes
+# References: Jörg Schilling pretends to have reported this two
+# years ago (<42551FF2.nail98011FRAT@burner>).
+
+# Test idea:
+# 1. Create a listed-incremental archive of a directory containing
+# a cetrain number of zero-length files.
+# 2. Using the same snapshot file, create a *multivolume* listed-incremental
+# archive. Number of files created in the directory and volume size should
+# be selected so that the first volume ends in the midst of the directory
+# member. The files are zero-length so that their member records are
+# sufficiently small, in order for the entire archive to fit in two volumes.
+# 3. Test the created multi-volume archive.
+
+AT_SETUP([Split directory members in a MV archive])
+AT_KEYWORDS([multiv04])
+
+AT_TAR_CHECK([
+
+mkdir directory
+awk 'BEGIN { for (i = 0; i < 1024; i++) printf("genfile -f directory/%014X\n", i); }' | sh
+
+sleep 2
+
+tar --listed-incremental=list -c -f archive.a directory
+
+sleep 2
+
+tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory
+
+echo separator
+
+tar -MRt -f arc.1 -f arc.2],
+[0],
+[directory/
+separator
+block 0: directory/
+block 35: ** Block of NULs **
+],
+[],
+[],[],[gnu, oldgnu])
+
+AT_CLEANUP
+
+
+
+