]> git.ipfire.org Git - thirdparty/tar.git/commit
Fix compression tests
authorSergey Poznyakoff <gray@gnu.org>
Mon, 14 Jan 2019 16:08:21 +0000 (18:08 +0200)
committerSergey Poznyakoff <gray@gnu.org>
Mon, 14 Jan 2019 16:55:43 +0000 (18:55 +0200)
commita311b908c034b5d91bc55d04b3ae5f144be9a9b2
treecc5f885e7f0e02d9ee65b862d8372fd3e6fb9d89
parentcb07844454d8cc9fb21f53ace75975f91185a120
Fix compression tests

Existing compression tests used tar with compiled-in defaults. However,
some of the defaults are sure to create archives that are not byte-to-byte
reproducible (e.g. DEFAULT_ARCHIVE_FORMAT=POSIX, because the name field
in posix extended headers uses PID of the creating process by default).
Moreover, some compressors (e.g. gzip) store current timestamp in
the file header when compressing from stdin, so that using cmp on the
two created archives as the tests did is error-prone. Another problem
is that the tests implicitly assumed that tar uses archive suffix to
recognize its format when extracting, which isn't the case. Finally,
there's hardly any reason in using sed to create m4 sources, when
everything can be achieved by m4 itself.

* tests/Makefile.am: Remove generation of compress-*.at files.
* tests/compress.at.in: Remove.
* tests/compress.m4: New file.
* tests/testsuite.at: Include compress.m4, use TAR_CHECK_COMPRESS to
check compression options.
tests/Makefile.am
tests/compress.at.in [deleted file]
tests/compress.m4 [new file with mode: 0644]
tests/testsuite.at