1# Process this file with autom4te to create testsuite. -*- Autotest -*-
2
3# Test suite for GNU tar.
4# Copyright (C) 2005, 2006 Free Software Foundation, Inc.
5
6# This program is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 2, or (at your option)
9# any later version.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14# GNU General Public License for more details.
15
16# You should have received a copy of the GNU General Public License
17# along with this program; if not, write to the Free Software
18# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19# 02110-1301, USA.
20
21# Problem: Tar was not able to match directory name if the directory
22# member was split between two volumes
23# References: Jörg Schilling pretends to have reported this two
24# years ago (<42551FF2.nail98011FRAT@burner>).
25
26# Test idea:
27# 1. Create a listed-incremental archive of a directory containing
28# a cetrain number of zero-length files.
29# 2. Using the same snapshot file, create a *multivolume* listed-incremental
30# archive. Number of files created in the directory and volume size should
31# be selected so that the first volume ends in the midst of the directory
32# member. The files are zero-length so that their member records are
33# sufficiently small, in order for the entire archive to fit in two volumes.
34# 3. Test the created multi-volume archive.
35
36AT_SETUP([split directory members in a MV archive])
37AT_KEYWORDS([multivolume multiv incremental multiv04])
38
39AT_TAR_CHECK([
40
41mkdir directory
42awk 'BEGIN { for (i = 0; i < 1024; i++) printf("directory/%014x\n", i); }' </dev/null | genfile --files-from -
43
44exec <&-
45
46sleep 2
47
48tar --listed-incremental=list -c -f archive.a directory
49
50sleep 2
51
52tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory
53
54echo separator
55
56tar -MRt -f arc.1 -f arc.2],
57[0],
58[directory/
59separator
60block 0: directory/
61block 35: ** Block of NULs **
62],
63[],
64[],[],[gnu, oldgnu])
65
66AT_CLEANUP
67