• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

tar-test-inputs/H24-Mar-2019-75

00INDEXH A D18-Jun-20141.3 KiB2118

README.GNUtar-multivol.failH A D11-Oct-2003568 1810

README.create-and-removeH A D31-Jul-2003938 3424

README.gtarfailH A D16-Jun-20072.7 KiB6546

README.largefilesH A D18-Jun-20142 KiB4835

README.longnamesH A D18-Jun-20141.4 KiB5832

README.paxbugH A D18-Jun-2014629 2313

README.quicktestH A D18-Jun-20146 KiB154106

mkH A D19-Apr-20003.8 KiB4739

mk2H A D24-Jul-19941.3 KiB137

not_a_tar_fileH A D05-Mar-20021 KiB1810

not_a_tar_file1H A D27-Jan-20171 KiB1810

quicktest.filelistH A D19-Jun-20021.2 KiB2221

tartest-quicktest.outH A D19-Jun-20022.1 KiB3633

typescriptH A D07-Jun-2001932

README.GNUtar-multivol.fail

1
2This is a demonstration that GNU tar may create multi volume archives that
3GNU tar rejects to read back.
4
5Re�eat with the following files
6
7-rw-r--r--    1 root     star       139264 Oct 11 20:26 gnu-multi-fail-volume1.gtar
8-rw-r--r--    1 root     star       136192 Oct 11 20:27 gnu-multi-fail-volume2.gtar
9
10by calling:
11
12gtar -tvM -f gnu-multi-fail-volume1.gtar -f gnu-multi-fail-volume2.gtar
13
14There are other problems with the multi volume system from GNU tar tat are caused
15by the fact that the concept to create multi volume archives used by GNU tar
16is broken.
17
18

README.create-and-remove

1Warning:
2
3Most tar programs allow you remove arbitrary files by using hand crafted
4tar archibes that contain links to itself.
5
6A good implementation such as star/1.5a18 or newer as well as Solaris "pax"
7and FreeBSD "pax" check for problems.
8
9GNU tar does not!
10
11gtar xvf create-and-remove.tar
12gtar: Record size = 4 blocks
13f1
14f1
15gtar: f1: Cannot link to f1: No such file or directory
16gtar: Error exit delayed from previous errors
17
18ls -l f1
19ls: f1: No such file or directory
20
21Here is what the tar archives contain:
22
23star -tv < create-and-remove.tar
24star: Blocksize = 4 records.
25      0 -rw-r--r--  root/berlios Jul 25 20:06 2003 f1
26      0 Hrw-r--r--  root/berlios Jul 25 20:06 2003 f1 link to f1
27star: 1 blocks + 0 bytes (total of 2048 bytes = 2.00k).
28
29star -tv < remove.tar
30star: Blocksize = 3 records.
31      0 Hrw-r--r--  root/berlios Jul 25 20:06 2003 f1 link to f1
32star: 1 blocks + 0 bytes (total of 1536 bytes = 1.50k).
33
34

README.gtarfail

1The file gtarfail.tar is a POSIX compliant tar file that is
2not accepted by GNU tar.
3
4Here is a star listing of the tar archive:
5
6    518 -rw-r--r-- jes/glone May 25 16:41 2001 vedpowered.gif
7   6825 -rw-r--r-- jes/glone Apr 29 02:19 1997 cd.gif
8  33354 -rw-r--r-- jes/glone Jun 22 14:17 1999 DSCN0049c.JPG
9
10
11Here is how Sun's tar program lists the archive:
12
13-rw-r--r-- 486/1060    518 Mai 25 16:41 2001 vedpowered.gif
14-rw-r--r-- 486/1060   6825 Apr 29 02:19 1997 cd.gif
15-rw-r--r-- 486/1060  33354 Jun 22 14:17 1999 DSCN0049c.JPG
16
17
18And this is how GNU tar-1.13.25 lists is:
19
20-rw-r--r-- jes/glone       518 2001-05-25 16:41:06 vedpowered.gif
21gtar: Skipping to next header
22-rw-r--r-- jes/glone     33354 1999-06-22 14:17:38 DSCN0049c.JPG
23gtar: Error exit delayed from previous errors
24
25
26/*--------------------------------------------------------------------------*/
27Next try: gtar-1.13.25 and file gtarfail2.tar
28
29
30A star lising of the archive:
31
32    214 -rwxr-xr-x jes/glone Sep 21 16:08 2001 .clean
33      0 lrwxrwxrwx jes/cats May  7 14:39 1998 RULES -> makefiles/RULES
34      0 drwxr-sr-x jes/glone Dec 10 01:00 2001 build/
35      0 drwxr-sr-x jes/glone Nov  9 19:20 2001 build/psmake/
36    259 -rwxr-xr-x jes/glone Jan  9 17:36 2000 build/psmake/MAKE
37   4820 -rwxr-xr-x jes/glone Feb 25 23:45 2001 build/psmake/MAKE.sh
38    647 -rw-r--r-- jes/glone Feb 26 00:50 2001 build/psmake/Makefile
39      0 lrwxrwxrwx jes/glone Aug 29 12:53 2001 build/psmake/archconf.c -> ../archconf.c
40      0 lrwxrwxrwx jes/glone Aug 29 12:54 2001 build/psmake/astoi.c -> ../../lib/astoi.c
41star: 31 blocks + 8192 bytes (total of 325632 bytes = 318.00k).
42
43A Sun tar listing of the archive:
44
45-rwxr-xr-x 486/1060    214 Sep 21 16:08 2001 .clean
46lrwxrwxrwx 486/2000     15 Mai  7 14:39 1998 RULES symbolic link zu makefiles/RULES
47drwxr-sr-x 486/1060      0 Dez 10 01:00 2001 build/
48drwxr-sr-x 486/1060      0 Nov  9 19:20 2001 build/psmake/
49-rwxr-xr-x 486/1060    259 Jan  9 17:36 2000 build/psmake/MAKE
50-rwxr-xr-x 486/1060   4820 Feb 25 23:45 2001 build/psmake/MAKE.sh
51-rw-r--r-- 486/1060    647 Feb 26 00:50 2001 build/psmake/Makefile
52lrwxrwxrwx 486/1060     13 Aug 29 12:53 2001 build/psmake/archconf.c symbolic link zu ../archconf.c
53lrwxrwxrwx 486/1060     17 Aug 29 12:54 2001 build/psmake/astoi.c symbolic link zu ../../lib/astoi.c
54
55A gtar-1.13.25 listing of the archive:
56
57-rwxr-xr-x jes/glone       214 2001-09-21 16:08:36 .clean
58drwxr-sr-x jes/glone         0 2001-12-10 01:00:58 build/
59-rwxr-xr-x jes/glone       259 2000-01-09 17:36:34 build/psmake/MAKE
60gtar: Skipping to next header
61gtar: Archive contains obsolescent base-64 headers
62-rw-r--r-- jes/glone       647 2001-02-26 00:50:06 build/psmake/Makefile
63gtar: Error exit delayed from previous errors
64
65

README.largefiles

1Note that the test tar archives used for this conformance test are bzip2
2compressed. This has been done because it is the only widely available
3compression format that allows to compress several gigabytes of nulls
4into a few bytes.
5
6A recent version of the files is always on:
7
8	http://sourceforge.net/projects/s-tar/files/testscripts/
9
10
11The file 'ustar-big-2g.tar.bz2' contains a file with the largest size that
12a historic tar implementation is able to understand.
13
14star tvf ustar-big-2g.tar.bz2
15star: WARNING: Archive is bzip2 compressed, trying to use the -bz option.
162147483647 -rw-------  jes/glone Jun 15 16:53 2002 big
17         0 -rw-r--r--  jes/glone Jun 15 16:53 2002 file
18star: 209715 blocks + 4096 bytes (total of 2147485696 bytes = 2097154.00k).
19star: Total time 104.572sec (20054 kBytes/sec)
20
21
22The file 'ustar-big-8g.tar.bz2' contains a file with the largest size that
23may be used with the ustar (POSIX.1-1990 tar) format.
24
25star tvf ustar-big-8g.tar.bz2
26star: WARNING: Archive is bzip2 compressed, trying to use the -bz option.
278589934591 -rw-------  jes/glone Jun 15 17:08 2002 8gb-1
28         0 -rw-r--r--  jes/glone Jun 15 16:53 2002 file
29star: 838861 blocks + 0 bytes (total of 8589936640 bytes = 8388610.00k).
30star: Total time 405.927sec (20665 kBytes/sec)
31
32The file 'pax-big-10g.tar.bz2' contains a file with size 1 GB.
33This file may only be represented using the new POSIX.1-2001 extended tar
34format using extended headers. This extended archive format has been called
35PAX.
36
37star tvf pax-big-10g.tar.bz2
38star: WARNING: Archive is bzip2 compressed, trying to use the -bz option.
3910737418240 -rw-------  jes/glone Jun 15 23:18 2002 10g
40          0 -rw-r--r--  jes/glone Jun 15 16:53 2002 file
41star: 1048576 blocks + 3072 bytes (total of 10737421312 bytes = 10485763.00k).
42star: Total time 563.352sec (18613 kBytes/sec)
43
44Only a POSIX.1-2001 conforming program will be able to read the archive
45correctly. For now, June 2002 star seems to be the only POSIX.1-2001 conforming
46TAR program.
47
48

README.longnames

1This are shell scripts to create long filenames.
2If you like more tests, write me.
3
4A recent version of the files is always on:
5
6	http://sourceforge.net/projects/s-tar/files/testscripts/
7
8
9The file 'mk' creates file names that check the behaviour of
10tar close to or at the POSIX filename length limit
11
12run ./mk to create the files.
13
14
15The file 'mk2' creates files that are bejond the scope of POSIX tar
16
17run ./mk2 to create the files
18
19In all cases to test the behaviour of tar you need to run:
20
21tar cf filename _*
22
23to check the POSIX scope and
24
25tar cf filename *
26
27to check against all possibilities.
28
29The length of the filenames is computed in a way that will be wrong
30if the filename is prepended by './'
31
32In order to help to test and debug tar implementations that have not
33been tested to be corect yet, I added a file long.ustar.gz
34This file is a 100% POSIX compiliant tar archive of all files created
35by ./mk that can be archived by a POSIX compliant tar implementation.
36
37To test your tar implementation against 'star' which could be called a
38POSIX reference implementation run:
39
40gzip -d < long.ustar.gz | tar tvf -
41
42Replace tar by the name of the tar implementation that needs to be tested.
43
44If you like to check which files are not handled correctly, get the
45latest star from ftp://ftp.berlios.de/pub/star/alpha/
46and after compilation run:
47
48star -tz < long.ustar.gz >L1
49
50Then run:
51
52gzip -d < long.ustar.gz | yourtar tf - > L2
53
54and finally:
55
56diff L1 L2
57
58

README.paxbug

1PAX is computing the TAR checksum wrong. The standard says that
2the checksum needs to be computed over the whole 512 bytes of the
3header. PAX only computes the checksum for 500 bytes which is
4incorrect.
5
6A recent version of the files is always on:
7
8	http://sourceforge.net/projects/s-tar/files/testscripts/
9
10
11To verify the problem try:
12
13	pax -itv < not_a_tar_file
14
15And see what's happening.
16
17Any correct TAR implementation will correctly state that the checksum is
18wrong and not try to interpret the data as TAR archive.
19
20To understand what's happening, have a look into the file 'not_a_tar_file',
21it is a plain text file.....
22
23

README.quicktest

1For compliance tests with POSIX.1-1990 you need to test the output of
2your favorite TAR implementation and you need to test whether the TAR
3implementation does work as expected if it encounters tar archives that
4approach limits of the POAIS.1-1990 TAR specification.
5
6A recent version of the files is always on:
7
8	http://sourceforge.net/projects/s-tar/files/testscripts/
9
10Here comes a quick test that checks most important issues for archive exchange:
11
121) Test for compliance with files that are a bit bigger than usual:
13
14	Note that the test tar archives used for this conformance test are
15	bzip2 compressed. This has been done because it is the only widely
16	available compression format that allows to compress several gigabytes of
17	nulls into a few bytes.
18
19	*** File Read tests 2 Gigabytes - 1 Byte
20
21	The file 'ustar-big-2g.tar.bz2' contains a file with the largest size
22	that a historic tar implementation is able to understand.
23
24	star tvf ustar-big-2g.tar.bz2
25	star: WARNING: Archive is bzip2 compressed, trying to use the -bz option.
26	2147483647 -rw-------  jes/glone Jun 15 16:53 2002 big
27	         0 -rw-r--r--  jes/glone Jun 15 16:53 2002 file
28	star: 209715 blocks + 4096 bytes (total of 2147485696 bytes = 2097154.00k).
29
30	Any tar implementation should work correctly with this archive and
31	needs to list _both_ files without any error message if you call:
32
33	bzip2 -d < ustar-big-2g.tar.bz2 | your_tar tvf -
34
35	If any error message is printed or the second file is missing on your
36	list, then your TAR implementation under test is broken.
37
38	*** File Read tests 8 Gigabytes - 1 Byte
39
40	The file 'ustar-big-8g.tar.bz2' contains a file with the largest size
41	that may be used with the ustar (POSIX.1-1990 tar) format.
42
43	star tvf ustar-big-8g.tar.bz2
44	star: WARNING: Archive is bzip2 compressed, trying to use the -bz option.
45	8589934591 -rw-------  jes/glone Jun 15 17:08 2002 8gb-1
46	         0 -rw-r--r--  jes/glone Jun 15 16:53 2002 file
47	star: 838861 blocks + 0 bytes (total of 8589936640 bytes = 8388610.00k).
48
49	On non-large file aware platforms (such as AIX) this may fail.
50	But Linux-2.4 is large file aware. On a large file aware platform,
51	any tar implementation should work correctly with this archive and
52	needs to list _both_ files without any error message if you call:
53
54	bzip2 -d < ustar-big-8g.tar.bz2 | your_tar tvf -
55
56	If any error message is printed or the second file is missing on your
57	list, then your TAR implementation under test is broken.
58
59
602) Test if your TAR implementation did unpack the archive correctly by using
61   star to diff against the archive. Run:
62
63	star -diff -v diffopts=!atime,ctime < /tmp/ustar-all-quicktest.tar
64
65   Make sure you use star-1.5a04 or later to do the diff.
66
67
683) Testing whether your TAR implementation supports all file types and long file
69   names correctly.
70
71	The archive "ustar-all-quicktest.tar" contains:
72
73	-	A first part that contains correct and simple versions of all
74		supported file types: plain file, hard link, sym link, cdev,
75		bdev. directory, contiguous file.
76
77	-	The second part contains a file with one character that has the
78		8th bit set in the file name. If your TAR implementation does
79		not compute checksums correctly, it will fail here.
80
81	-	The third part contains a file and a hard link which use
82		exactly 100 characters in the filename/linkname.
83
84	-	A fourth part that contains a file name that is 256 characters
85		long. 155 characters are in the POSIX filename prefix and 100
86		characters are in the POSIX filename suffix.
87		This part also contains a file with a file name of 256
88		characters and a link name of 100 characters.
89
90	-	The fifth part contains a file with 256 characters in the name
91		but the usually unused field directly after the filename prefix
92		contains junk characters. If the TAR under test does not handle
93		file name prefix lengths of 155 chars correctly, the file name
94		that is extracted will contain the sequence "/abcde.hihi/"
95		instead of just "/abcde/"
96
97	-	The sixth part contains a character special, a block special, a
98		directory and a named pipe that have the "size" field != 0.
99		A TAR implementation that does not handle the "size" field as
100		indicated by the POSIX standard will fail here.
101
102	-	The last part contains a file called END to indicate that
103		everything went OK and that the last file in the archive is
104		handled correctly.
105
106	NOTE: as some tar implementions seem to have problems with extracting
107	contiguous files, I also made a tar archive called:
108
109		ustar-all-quicktest.tar-without-cont-file
110
111
112	Performing the test for the things described above:
113
114	1)	Create an empty directory and do a "chdir" into that directory.
115		Copy the test archive ustar-all-quicktest.tar into the directory
116		/tmp, copy the file quicktest.filelist into the /tmp directory
117		too.
118
119	2)	Become root and call:
120
121			your_tar xf /tmp/ustar-all-quicktest.tar
122
123		If your TAR allows to handle different archive types do _not_
124		tell your tar that this is a "ustar" archive. Let it find this
125		itself.
126
127	3)	Create a new archive using your TAR implementation:
128
129		your_tar cf /tmp/new.tar ` cat /tmp/quicktest.filelist `
130
131		If you TAR implementation allows to handle different archive
132		types add an option to force "ustar" archive creation. For
133		"star" this is -Hustar, for "GNU tar" this is --posix.
134
135		*** IMPORTANT:	a POSIX.1-1990 compliant Tar implementation
136				needs to be able to archive all files without
137				using any vendor specific extensions.
138
139	4)	Run tartest to check the archives for POSIX.1-1990 compliance.
140		The working version of the "tartest" program is part of
141		star-1.5a04 or later.
142
143		tartest -v < /tmp/ustar-all-quicktest.tar	> /tmp/old.out
144		tartest -v < /tmp/new.tar			> /tmp/new.out
145
146	5)	Check the output file /tmp/new.out for POSIX.1-1990
147		noncompliances. If you did not find any wrning, them run
148		"diff /tmp/old.out /tmp/new.out" to check if no file name has
149		been changed due to a bug in your TAR program under test.
150
151	The output of the "tartest -v" run on the original test archive
152	may be found (for reference purposes)  in the file
153	'tartest-quicktest.out'.
154