README.GNUtar-multivol.fail
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
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