aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2021-03-05 15:53:21 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2021-03-06 22:08:36 +0100
commitb950412ca3a91aa37349cf51ebe98cc84767d448 (patch)
treee3bb062114d019984321a5a21b29818c88c36795
parent3fc6bf24b5cc071fc323f08ece541e37578f6369 (diff)
Cleanup: add some structure to the test directory
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
-rw-r--r--tests/Makemodule.am287
-rw-r--r--tests/fstree_glob1.txt2
-rw-r--r--tests/fstree_glob2.txt3
-rw-r--r--tests/libfstream/Makemodule.am11
-rw-r--r--tests/libfstream/get_line.c (renamed from tests/get_line.c)2
-rw-r--r--tests/libfstream/get_line.txt (renamed from tests/get_line.txt)0
-rw-r--r--tests/libfstree/Makemodule.am76
-rw-r--r--tests/libfstree/add_by_path.c (renamed from tests/add_by_path.c)2
-rw-r--r--tests/libfstree/canonicalize_name.c (renamed from tests/canonicalize_name.c)2
-rw-r--r--tests/libfstree/filename_sane.c (renamed from tests/filename_sane.c)2
-rw-r--r--tests/libfstree/fstree1.txt (renamed from tests/fstree1.txt)0
-rw-r--r--tests/libfstree/fstree_from_dir.c (renamed from tests/fstree_from_dir.c)2
-rw-r--r--tests/libfstree/fstree_from_file.c (renamed from tests/fstree_from_file.c)2
-rw-r--r--tests/libfstree/fstree_fuzz.c (renamed from tests/fstree_fuzz.c)0
-rw-r--r--tests/libfstree/fstree_glob1.c (renamed from tests/fstree_glob1.c)2
-rw-r--r--tests/libfstree/fstree_glob1.txt2
-rw-r--r--tests/libfstree/fstree_glob2.txt3
-rw-r--r--tests/libfstree/fstree_init.c (renamed from tests/fstree_init.c)2
-rw-r--r--tests/libfstree/fstree_sort.c (renamed from tests/fstree_sort.c)2
-rw-r--r--tests/libfstree/gen_inode_numbers.c (renamed from tests/gen_inode_numbers.c)2
-rw-r--r--tests/libfstree/get_path.c (renamed from tests/get_path.c)2
-rw-r--r--tests/libfstree/mknode_dir.c (renamed from tests/mknode_dir.c)2
-rw-r--r--tests/libfstree/mknode_reg.c (renamed from tests/mknode_reg.c)2
-rw-r--r--tests/libfstree/mknode_simple.c (renamed from tests/mknode_simple.c)2
-rw-r--r--tests/libfstree/mknode_slink.c (renamed from tests/mknode_slink.c)2
-rw-r--r--tests/libsqfs/Makemodule.am5
-rw-r--r--tests/libsqfs/abi.c (renamed from tests/abi.c)2
-rw-r--r--tests/libtar/Makemodule.am178
-rw-r--r--tests/libtar/data/CREDITS (renamed from tests/tar/CREDITS)0
-rw-r--r--tests/libtar/data/file-size/12-digit.tar (renamed from tests/tar/file-size/12-digit.tar)bin2048 -> 2048 bytes
-rw-r--r--tests/libtar/data/file-size/gnu.tar (renamed from tests/tar/file-size/gnu.tar)bin2048 -> 2048 bytes
-rw-r--r--tests/libtar/data/file-size/pax.tar (renamed from tests/tar/file-size/pax.tar)bin2048 -> 2048 bytes
-rw-r--r--tests/libtar/data/format-acceptance/gnu-g.tar (renamed from tests/tar/format-acceptance/gnu-g.tar)bin2048 -> 2048 bytes
-rw-r--r--tests/libtar/data/format-acceptance/gnu.tar (renamed from tests/tar/format-acceptance/gnu.tar)bin2048 -> 2048 bytes
-rw-r--r--tests/libtar/data/format-acceptance/link_filled.tar (renamed from tests/tar/format-acceptance/link_filled.tar)bin10240 -> 10240 bytes
-rw-r--r--tests/libtar/data/format-acceptance/pax.tar (renamed from tests/tar/format-acceptance/pax.tar)bin3072 -> 3072 bytes
-rw-r--r--tests/libtar/data/format-acceptance/ustar-pre-posix.tar (renamed from tests/tar/format-acceptance/ustar-pre-posix.tar)bin2048 -> 2048 bytes
-rw-r--r--tests/libtar/data/format-acceptance/ustar.tar (renamed from tests/tar/format-acceptance/ustar.tar)bin2048 -> 2048 bytes
-rw-r--r--tests/libtar/data/format-acceptance/v7.tar (renamed from tests/tar/format-acceptance/v7.tar)bin2048 -> 2048 bytes
-rw-r--r--tests/libtar/data/large-mtime/12-digit.tar (renamed from tests/tar/large-mtime/12-digit.tar)bin2048 -> 2048 bytes
-rw-r--r--tests/libtar/data/large-mtime/gnu.tar (renamed from tests/tar/large-mtime/gnu.tar)bin2048 -> 2048 bytes
-rw-r--r--tests/libtar/data/large-mtime/pax.tar (renamed from tests/tar/large-mtime/pax.tar)bin3072 -> 3072 bytes
-rw-r--r--tests/libtar/data/long-paths/gnu.tar (renamed from tests/tar/long-paths/gnu.tar)bin3072 -> 3072 bytes
-rw-r--r--tests/libtar/data/long-paths/pax.tar (renamed from tests/tar/long-paths/pax.tar)bin3072 -> 3072 bytes
-rw-r--r--tests/libtar/data/long-paths/ustar.tar (renamed from tests/tar/long-paths/ustar.tar)bin2048 -> 2048 bytes
-rw-r--r--tests/libtar/data/negative-mtime/gnu.tar (renamed from tests/tar/negative-mtime/gnu.tar)bin10240 -> 10240 bytes
-rw-r--r--tests/libtar/data/negative-mtime/pax.tar (renamed from tests/tar/negative-mtime/pax.tar)bin10240 -> 10240 bytes
-rw-r--r--tests/libtar/data/sparse-files/gnu-small.tar (renamed from tests/tar/sparse-files/gnu-small.tar)bin9728 -> 9728 bytes
-rw-r--r--tests/libtar/data/sparse-files/gnu.tar (renamed from tests/tar/sparse-files/gnu.tar)bin34816 -> 34816 bytes
-rw-r--r--tests/libtar/data/sparse-files/pax-gnu0-0.tar (renamed from tests/tar/sparse-files/pax-gnu0-0.tar)bin35840 -> 35840 bytes
-rw-r--r--tests/libtar/data/sparse-files/pax-gnu0-1.tar (renamed from tests/tar/sparse-files/pax-gnu0-1.tar)bin35328 -> 35328 bytes
-rw-r--r--tests/libtar/data/sparse-files/pax-gnu1-0.tar (renamed from tests/tar/sparse-files/pax-gnu1-0.tar)bin35840 -> 35840 bytes
-rw-r--r--tests/libtar/data/sqfs.sha512 (renamed from tests/tar/sqfs.sha512)54
-rw-r--r--tests/libtar/data/user-group-largenum/8-digit.tar (renamed from tests/tar/user-group-largenum/8-digit.tar)bin2048 -> 2048 bytes
-rw-r--r--tests/libtar/data/user-group-largenum/gnu.tar (renamed from tests/tar/user-group-largenum/gnu.tar)bin2048 -> 2048 bytes
-rw-r--r--tests/libtar/data/user-group-largenum/pax.tar (renamed from tests/tar/user-group-largenum/pax.tar)bin3072 -> 3072 bytes
-rw-r--r--tests/libtar/data/xattr/acl.tar (renamed from tests/tar/xattr/acl.tar)bin3072 -> 3072 bytes
-rw-r--r--tests/libtar/data/xattr/xattr-libarchive.tar (renamed from tests/tar/xattr/xattr-libarchive.tar)bin3072 -> 3072 bytes
-rw-r--r--tests/libtar/data/xattr/xattr-schily-binary.tar (renamed from tests/tar/xattr/xattr-schily-binary.tar)bin3072 -> 3072 bytes
-rw-r--r--tests/libtar/data/xattr/xattr-schily.tar (renamed from tests/tar/xattr/xattr-schily.tar)bin3072 -> 3072 bytes
-rw-r--r--tests/libtar/tar_big_file.c (renamed from tests/tar_big_file.c)2
-rw-r--r--tests/libtar/tar_fuzz.c (renamed from tests/tar_fuzz.c)0
-rw-r--r--tests/libtar/tar_simple.c (renamed from tests/tar_simple.c)2
-rw-r--r--tests/libtar/tar_sparse.c (renamed from tests/tar_sparse.c)2
-rw-r--r--tests/libtar/tar_sparse_gnu.c (renamed from tests/tar_sparse_gnu.c)2
-rw-r--r--tests/libtar/tar_target_filled.c (renamed from tests/tar_target_filled.c)2
-rw-r--r--tests/libtar/tar_xattr.c (renamed from tests/tar_xattr.c)2
-rw-r--r--tests/libtar/tar_xattr_bin.c (renamed from tests/tar_xattr_bin.c)2
-rw-r--r--tests/libutil/Makemodule.am16
-rw-r--r--tests/libutil/rbtree.c (renamed from tests/rbtree.c)2
-rw-r--r--tests/libutil/str_table.c (renamed from tests/str_table.c)2
-rw-r--r--tests/libutil/words.txt (renamed from tests/words.txt)0
-rw-r--r--tests/libutil/xxhash.c (renamed from tests/xxhash.c)2
-rwxr-xr-xtests/test_tar_sqfs.sh.in4
74 files changed, 351 insertions, 342 deletions
diff --git a/tests/Makemodule.am b/tests/Makemodule.am
index dd49ccd..8669fb1 100644
--- a/tests/Makemodule.am
+++ b/tests/Makemodule.am
@@ -1,294 +1,17 @@
-test_canonicalize_name_SOURCES = tests/canonicalize_name.c tests/test.h
-test_canonicalize_name_LDADD = libfstree.a
-
-test_str_table_SOURCES = tests/str_table.c tests/test.h
-test_str_table_LDADD = libutil.a libfstream.a libcompat.a
-test_str_table_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests
-test_str_table_CPPFLAGS += -I$(top_srcdir)/lib/sqfs
-
-test_rbtree_SOURCES = tests/rbtree.c tests/test.h
-test_rbtree_LDADD = libutil.a libcompat.a
-test_rbtree_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/lib/sqfs
-
-test_xxhash_SOURCES = tests/xxhash.c
-test_xxhash_LDADD = libutil.a libcompat.a
-test_xxhash_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/lib/sqfs
-
-test_abi_SOURCES = tests/abi.c tests/test.h
-test_abi_LDADD = libsquashfs.la
-
-check_PROGRAMS += test_canonicalize_name test_str_table test_abi test_rbtree
-check_PROGRAMS += test_xxhash
-TESTS += test_canonicalize_name test_str_table test_abi test_rbtree test_xxhash
+include tests/libutil/Makemodule.am
+include tests/libfstream/Makemodule.am
+include tests/libfstree/Makemodule.am
+include tests/libtar/Makemodule.am
+include tests/libsqfs/Makemodule.am
if BUILD_TOOLS
-test_mknode_simple_SOURCES = tests/mknode_simple.c tests/test.h
-test_mknode_simple_LDADD = libfstree.a libcompat.a
-
-test_mknode_slink_SOURCES = tests/mknode_slink.c tests/test.h
-test_mknode_slink_LDADD = libfstree.a libcompat.a
-
-test_mknode_reg_SOURCES = tests/mknode_reg.c tests/test.h
-test_mknode_reg_LDADD = libfstree.a libcompat.a
-
-test_mknode_dir_SOURCES = tests/mknode_dir.c tests/test.h
-test_mknode_dir_LDADD = libfstree.a libcompat.a
-
-test_gen_inode_numbers_SOURCES = tests/gen_inode_numbers.c tests/test.h
-test_gen_inode_numbers_LDADD = libfstree.a libcompat.a
-
-test_add_by_path_SOURCES = tests/add_by_path.c tests/test.h
-test_add_by_path_LDADD = libfstree.a libcompat.a
-
-test_get_path_SOURCES = tests/get_path.c tests/test.h
-test_get_path_LDADD = libfstree.a libcompat.a
-
-test_fstree_sort_SOURCES = tests/fstree_sort.c tests/test.h
-test_fstree_sort_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/lib/fstree
-test_fstree_sort_LDADD = libfstree.a libfstream.a libcompat.a
-
-test_fstree_from_file_SOURCES = tests/fstree_from_file.c tests/test.h
-test_fstree_from_file_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/fstree1.txt
-test_fstree_from_file_LDADD = libfstree.a libfstream.a libcompat.a
-
-test_fstree_glob1_SOURCES = tests/fstree_glob1.c tests/test.h
-test_fstree_glob1_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests
-test_fstree_glob1_LDADD = libfstree.a libfstream.a libcompat.a
-
-test_fstree_from_dir_SOURCES = tests/fstree_from_dir.c tests/test.h
-test_fstree_from_dir_CPPFLAGS = $(AM_CPPFLAGS)
-test_fstree_from_dir_CPPFLAGS += -DTESTPATH=$(top_srcdir)/tests/tar
-test_fstree_from_dir_LDADD = libfstree.a libcompat.a
-
-test_fstree_init_SOURCES = tests/fstree_init.c tests/test.h
-test_fstree_init_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/lib/fstree
-test_fstree_init_LDADD = libfstree.a libfstream.a libcompat.a
-
-test_filename_sane_SOURCES = tests/filename_sane.c lib/fstree/filename_sane.c
-
-test_filename_sane_w32_SOURCES = tests/filename_sane.c
-test_filename_sane_w32_SOURCES += lib/fstree/filename_sane.c
-test_filename_sane_w32_CPPFLAGS = $(AM_CPPFLAGS) -DTEST_WIN32=1
-
-test_tar_gnu0_SOURCES = tests/tar_simple.c tests/test.h
-test_tar_gnu0_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_gnu0_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_gnu0_CPPFLAGS += -DTESTFILE=format-acceptance/gnu.tar
-
-test_tar_gnu1_SOURCES = tests/tar_simple.c tests/test.h
-test_tar_gnu1_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_gnu1_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_gnu1_CPPFLAGS += -DTESTFILE=format-acceptance/gnu-g.tar
-
-test_tar_gnu2_SOURCES = tests/tar_simple.c tests/test.h
-test_tar_gnu2_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_gnu2_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_gnu2_CPPFLAGS += -DTESTFILE=user-group-largenum/gnu.tar
-test_tar_gnu2_CPPFLAGS += -DTESTUID=0x80000000 -DTESTGID=0x80000000
-test_tar_gnu2_CPPFLAGS += -DTESTTS=1542995392
-
-test_tar_gnu3_SOURCES = tests/tar_simple.c tests/test.h
-test_tar_gnu3_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_gnu3_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_gnu3_CPPFLAGS += -DTESTFILE=negative-mtime/gnu.tar -DTESTTS=-315622800
-
-test_tar_gnu4_SOURCES = tests/tar_simple.c tests/test.h
-test_tar_gnu4_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_gnu4_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_gnu4_CPPFLAGS += -DTESTFILE=long-paths/gnu.tar -DLONG_NAME_TEST
-test_tar_gnu4_CPPFLAGS += -DTESTTS=1542909670
-
-test_tar_gnu5_SOURCES = tests/tar_simple.c tests/test.h
-test_tar_gnu5_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_gnu5_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_gnu5_CPPFLAGS += -DTESTFILE=large-mtime/gnu.tar -DTESTTS=8589934592L
-
-test_tar_gnu6_SOURCES = tests/tar_big_file.c tests/test.h
-test_tar_gnu6_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_gnu6_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_gnu6_CPPFLAGS += -DTESTFILE=file-size/gnu.tar
-
-test_tar_pax0_SOURCES = tests/tar_simple.c tests/test.h
-test_tar_pax0_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_pax0_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_pax0_CPPFLAGS += -DTESTFILE=format-acceptance/pax.tar
-
-test_tar_pax1_SOURCES = tests/tar_simple.c tests/test.h
-test_tar_pax1_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_pax1_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_pax1_CPPFLAGS += -DTESTFILE=user-group-largenum/pax.tar
-test_tar_pax1_CPPFLAGS += -DTESTUID=2147483648UL -DTESTGID=2147483648UL
-test_tar_pax1_CPPFLAGS += -DTESTTS=1542995392
-
-test_tar_pax2_SOURCES = tests/tar_simple.c tests/test.h
-test_tar_pax2_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_pax2_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_pax2_CPPFLAGS += -DTESTFILE=large-mtime/pax.tar -DTESTTS=8589934592L
-
-test_tar_pax3_SOURCES = tests/tar_simple.c tests/test.h
-test_tar_pax3_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_pax3_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_pax3_CPPFLAGS += -DTESTFILE=negative-mtime/pax.tar -DTESTTS=-315622800
-
-test_tar_pax4_SOURCES = tests/tar_simple.c tests/test.h
-test_tar_pax4_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_pax4_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_pax4_CPPFLAGS += -DTESTFILE=long-paths/pax.tar
-test_tar_pax4_CPPFLAGS += -DLONG_NAME_TEST -DTESTTS=1542909670
-
-test_tar_pax5_SOURCES = tests/tar_big_file.c tests/test.h
-test_tar_pax5_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_pax5_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_pax5_CPPFLAGS += -DTESTFILE=file-size/pax.tar
-
-test_tar_ustar0_SOURCES = tests/tar_simple.c tests/test.h
-test_tar_ustar0_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_ustar0_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_ustar0_CPPFLAGS += -DTESTFILE=format-acceptance/ustar.tar
-
-test_tar_ustar1_SOURCES = tests/tar_simple.c tests/test.h
-test_tar_ustar1_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_ustar1_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_ustar1_CPPFLAGS += -DTESTFILE=format-acceptance/ustar-pre-posix.tar
-
-test_tar_ustar2_SOURCES = tests/tar_simple.c tests/test.h
-test_tar_ustar2_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_ustar2_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_ustar2_CPPFLAGS += -DTESTFILE=format-acceptance/v7.tar
-
-test_tar_ustar3_SOURCES = tests/tar_simple.c tests/test.h
-test_tar_ustar3_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_ustar3_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_ustar3_CPPFLAGS += -DTESTFILE=user-group-largenum/8-digit.tar
-test_tar_ustar3_CPPFLAGS += -DTESTUID=8388608 -DTESTGID=8388608
-test_tar_ustar3_CPPFLAGS += -DTESTTS=1542995392
-
-test_tar_ustar4_SOURCES = tests/tar_simple.c tests/test.h
-test_tar_ustar4_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_ustar4_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_ustar4_CPPFLAGS += -DTESTFILE=large-mtime/12-digit.tar
-test_tar_ustar4_CPPFLAGS += -DTESTTS=8589934592L
-
-test_tar_ustar5_SOURCES = tests/tar_simple.c tests/test.h
-test_tar_ustar5_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_ustar5_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_ustar5_CPPFLAGS += -DTESTFILE=long-paths/ustar.tar
-test_tar_ustar5_CPPFLAGS += -DLONG_NAME_TEST -DTESTTS=1542909670
-
-test_tar_ustar6_SOURCES = tests/tar_big_file.c tests/test.h
-test_tar_ustar6_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_ustar6_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_ustar6_CPPFLAGS += -DTESTFILE=file-size/12-digit.tar
-
-test_tar_target_filled_SOURCES = tests/tar_target_filled.c tests/test.h
-test_tar_target_filled_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_target_filled_CPPFLAGS = $(AM_CPPFLAGS)
-test_tar_target_filled_CPPFLAGS += -DTESTPATH=$(top_srcdir)/tests/tar
-
-test_tar_sparse_gnu_SOURCES = tests/tar_sparse_gnu.c tests/test.h
-test_tar_sparse_gnu_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_sparse_gnu_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-
-test_tar_sparse_gnu0_SOURCES = tests/tar_sparse.c tests/test.h
-test_tar_sparse_gnu0_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_sparse_gnu0_CPPFLAGS = $(AM_CPPFLAGS)
-test_tar_sparse_gnu0_CPPFLAGS += -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_sparse_gnu0_CPPFLAGS += -DTESTFILE=sparse-files/pax-gnu0-0.tar
-
-test_tar_sparse_gnu1_SOURCES = tests/tar_sparse.c tests/test.h
-test_tar_sparse_gnu1_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_sparse_gnu1_CPPFLAGS = $(AM_CPPFLAGS)
-test_tar_sparse_gnu1_CPPFLAGS += -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_sparse_gnu1_CPPFLAGS += -DTESTFILE=sparse-files/pax-gnu0-1.tar
-
-test_tar_sparse_gnu2_SOURCES = tests/tar_sparse.c tests/test.h
-test_tar_sparse_gnu2_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_sparse_gnu2_CPPFLAGS = $(AM_CPPFLAGS)
-test_tar_sparse_gnu2_CPPFLAGS += -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_sparse_gnu2_CPPFLAGS += -DTESTFILE=sparse-files/pax-gnu1-0.tar
-
-test_tar_sparse_gnu3_SOURCES = tests/tar_sparse.c tests/test.h
-test_tar_sparse_gnu3_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_sparse_gnu3_CPPFLAGS = $(AM_CPPFLAGS)
-test_tar_sparse_gnu3_CPPFLAGS += -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_sparse_gnu3_CPPFLAGS += -DTESTFILE=sparse-files/gnu.tar
-
-test_tar_xattr_bsd_SOURCES = tests/tar_xattr.c tests/test.h
-test_tar_xattr_bsd_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_xattr_bsd_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_xattr_bsd_CPPFLAGS += -DTESTFILE=xattr/xattr-libarchive.tar
-
-test_tar_xattr_schily_SOURCES = tests/tar_xattr.c tests/test.h
-test_tar_xattr_schily_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_xattr_schily_CPPFLAGS = $(AM_CPPFLAGS)
-test_tar_xattr_schily_CPPFLAGS += -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_xattr_schily_CPPFLAGS += -DTESTFILE=xattr/xattr-schily.tar
-
-test_tar_xattr_schily_bin_SOURCES = tests/tar_xattr_bin.c tests/test.h
-test_tar_xattr_schily_bin_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_xattr_schily_bin_CPPFLAGS = $(AM_CPPFLAGS)
-test_tar_xattr_schily_bin_CPPFLAGS += -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_xattr_schily_bin_CPPFLAGS += -DTESTFILE=xattr/xattr-schily-binary.tar
-
-fstree_fuzz_SOURCES = tests/fstree_fuzz.c
-fstree_fuzz_LDADD = libfstree.a libfstream.a libcompat.a
-
-tar_fuzz_SOURCES = tests/tar_fuzz.c
-tar_fuzz_LDADD = libtar.a libfstream.a libcompat.a
-
-test_get_line_SOURCES = tests/get_line.c tests/test.h
-test_get_line_LDADD = libfstream.a libcompat.a
-test_get_line_CPPFLAGS = $(AM_CPPFLAGS)
-test_get_line_CPPFLAGS += -DTESTFILE=$(top_srcdir)/tests/get_line.txt
-
-check_PROGRAMS += test_mknode_simple test_mknode_slink test_mknode_reg
-check_PROGRAMS += test_mknode_dir test_gen_inode_numbers test_add_by_path
-check_PROGRAMS += test_get_path test_fstree_sort test_fstree_from_file
-check_PROGRAMS += test_fstree_init test_filename_sane test_filename_sane_w32
-check_PROGRAMS += test_fstree_from_dir test_fstree_glob1
-check_PROGRAMS += test_tar_ustar0 test_tar_ustar1 test_tar_ustar2
-check_PROGRAMS += test_tar_ustar3 test_tar_ustar4 test_tar_ustar5
-check_PROGRAMS += test_tar_ustar6
-check_PROGRAMS += test_tar_pax0 test_tar_pax1 test_tar_pax2 test_tar_pax3
-check_PROGRAMS += test_tar_pax4 test_tar_pax5
-check_PROGRAMS += test_tar_gnu0 test_tar_gnu1 test_tar_gnu2 test_tar_gnu3
-check_PROGRAMS += test_tar_gnu4 test_tar_gnu5 test_tar_gnu6
-check_PROGRAMS += test_tar_sparse_gnu test_tar_sparse_gnu0 test_tar_sparse_gnu1
-check_PROGRAMS += test_tar_sparse_gnu2 test_tar_sparse_gnu3
-check_PROGRAMS += test_tar_xattr_bsd test_tar_xattr_schily
-check_PROGRAMS += test_tar_xattr_schily_bin test_tar_target_filled
-check_PROGRAMS += test_get_line
-
-noinst_PROGRAMS += fstree_fuzz tar_fuzz
-
-TESTS += test_mknode_simple test_mknode_slink
-TESTS += test_mknode_reg test_mknode_dir test_gen_inode_numbers
-TESTS += test_add_by_path test_get_path test_fstree_sort test_fstree_from_file
-TESTS += test_fstree_init test_filename_sane test_filename_sane_w32
-TESTS += test_fstree_from_dir test_fstree_glob1
-TESTS += test_tar_ustar0 test_tar_ustar1 test_tar_ustar2 test_tar_ustar3
-TESTS += test_tar_ustar4 test_tar_ustar5 test_tar_ustar6
-TESTS += test_tar_gnu0 test_tar_gnu1 test_tar_gnu2 test_tar_gnu3 test_tar_gnu4
-TESTS += test_tar_gnu5 test_tar_gnu6
-TESTS += test_tar_pax0 test_tar_pax1 test_tar_pax2 test_tar_pax3 test_tar_pax4
-TESTS += test_tar_pax5
-TESTS += test_tar_sparse_gnu test_tar_sparse_gnu0
-TESTS += test_tar_sparse_gnu1 test_tar_sparse_gnu2 test_tar_sparse_gnu3
-TESTS += test_tar_xattr_bsd test_tar_xattr_schily
-TESTS += test_tar_xattr_schily_bin test_tar_target_filled test_get_line
-
if CORPORA_TESTS
check_SCRIPTS += tests/cantrbry.sh tests/test_tar_sqfs.sh tests/pack_dir_root.sh
TESTS += tests/cantrbry.sh tests/test_tar_sqfs.sh tests/pack_dir_root.sh
endif
endif
-EXTRA_DIST += $(top_srcdir)/tests/tar $(top_srcdir)/tests/words.txt
EXTRA_DIST += $(top_srcdir)/tests/tar2sqfs
-EXTRA_DIST += $(top_srcdir)/tests/fstree1.txt
-EXTRA_DIST += $(top_srcdir)/tests/fstree_glob1.txt
-EXTRA_DIST += $(top_srcdir)/tests/fstree_glob2.txt
EXTRA_DIST += $(top_srcdir)/tests/corpus/cantrbry.tar.xz
EXTRA_DIST += $(top_srcdir)/tests/corpus/cantrbry.sha512
EXTRA_DIST += $(top_srcdir)/tests/pack_dir_root.txt.ref
-EXTRA_DIST += $(top_srcdir)/tests/get_line.txt
diff --git a/tests/fstree_glob1.txt b/tests/fstree_glob1.txt
deleted file mode 100644
index 0d96391..0000000
--- a/tests/fstree_glob1.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-dir /tarcorpus 0755 0 0
-glob /tarcorpus 0755 0 0 -type d -- tar
diff --git a/tests/fstree_glob2.txt b/tests/fstree_glob2.txt
deleted file mode 100644
index f423b4a..0000000
--- a/tests/fstree_glob2.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-dir /tarcorpus 0755 0 0
-glob /tarcorpus 0755 0 0 -type d tar
-glob /tarcorpus 0644 0 0 -type f -name "*gnu*.tar" -- tar
diff --git a/tests/libfstream/Makemodule.am b/tests/libfstream/Makemodule.am
new file mode 100644
index 0000000..bba35f5
--- /dev/null
+++ b/tests/libfstream/Makemodule.am
@@ -0,0 +1,11 @@
+test_get_line_SOURCES = tests/libfstream/get_line.c tests/test.h
+test_get_line_LDADD = libfstream.a libcompat.a
+test_get_line_CPPFLAGS = $(AM_CPPFLAGS)
+test_get_line_CPPFLAGS += -DTESTFILE=$(top_srcdir)/tests/libfstream/get_line.txt
+
+if BUILD_TOOLS
+check_PROGRAMS += test_get_line
+TESTS += test_get_line
+endif
+
+EXTRA_DIST += $(top_srcdir)/tests/libfstream/get_line.txt
diff --git a/tests/get_line.c b/tests/libfstream/get_line.c
index c317c0e..a2f6d85 100644
--- a/tests/get_line.c
+++ b/tests/libfstream/get_line.c
@@ -7,7 +7,7 @@
#include "config.h"
#include "fstream.h"
-#include "test.h"
+#include "../test.h"
typedef struct {
size_t line_num;
diff --git a/tests/get_line.txt b/tests/libfstream/get_line.txt
index a1994f0..a1994f0 100644
--- a/tests/get_line.txt
+++ b/tests/libfstream/get_line.txt
diff --git a/tests/libfstree/Makemodule.am b/tests/libfstree/Makemodule.am
new file mode 100644
index 0000000..4dc6da1
--- /dev/null
+++ b/tests/libfstree/Makemodule.am
@@ -0,0 +1,76 @@
+FSTDATADIR=$(top_srcdir)/tests/libfstree
+
+test_canonicalize_name_SOURCES = tests/libfstree/canonicalize_name.c
+test_canonicalize_name_SOURCES += tests/test.h
+test_canonicalize_name_LDADD = libfstree.a
+
+test_mknode_simple_SOURCES = tests/libfstree/mknode_simple.c tests/test.h
+test_mknode_simple_LDADD = libfstree.a libcompat.a
+
+test_mknode_slink_SOURCES = tests/libfstree/mknode_slink.c tests/test.h
+test_mknode_slink_LDADD = libfstree.a libcompat.a
+
+test_mknode_reg_SOURCES = tests/libfstree/mknode_reg.c tests/test.h
+test_mknode_reg_LDADD = libfstree.a libcompat.a
+
+test_mknode_dir_SOURCES = tests/libfstree/mknode_dir.c tests/test.h
+test_mknode_dir_LDADD = libfstree.a libcompat.a
+
+test_gen_inode_numbers_SOURCES = tests/libfstree/gen_inode_numbers.c
+test_gen_inode_numbers_SOURCES += tests/test.h
+test_gen_inode_numbers_LDADD = libfstree.a libcompat.a
+
+test_add_by_path_SOURCES = tests/libfstree/add_by_path.c tests/test.h
+test_add_by_path_LDADD = libfstree.a libcompat.a
+
+test_get_path_SOURCES = tests/libfstree/get_path.c tests/test.h
+test_get_path_LDADD = libfstree.a libcompat.a
+
+test_fstree_sort_SOURCES = tests/libfstree/fstree_sort.c tests/test.h
+test_fstree_sort_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/lib/fstree
+test_fstree_sort_LDADD = libfstree.a libfstream.a libcompat.a
+
+test_fstree_from_file_SOURCES = tests/libfstree/fstree_from_file.c tests/test.h
+test_fstree_from_file_CPPFLAGS = $(AM_CPPFLAGS)
+test_fstree_from_file_CPPFLAGS += -DTESTPATH=$(FSTDATADIR)/fstree1.txt
+test_fstree_from_file_LDADD = libfstree.a libfstream.a libcompat.a
+
+test_fstree_glob1_SOURCES = tests/libfstree/fstree_glob1.c tests/test.h
+test_fstree_glob1_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(FSTDATADIR)
+test_fstree_glob1_LDADD = libfstree.a libfstream.a libcompat.a
+
+test_fstree_from_dir_SOURCES = tests/libfstree/fstree_from_dir.c tests/test.h
+test_fstree_from_dir_CPPFLAGS = $(AM_CPPFLAGS)
+test_fstree_from_dir_CPPFLAGS += -DTESTPATH=$(top_srcdir)/tests/libtar/data
+test_fstree_from_dir_LDADD = libfstree.a libcompat.a
+
+test_fstree_init_SOURCES = tests/libfstree/fstree_init.c tests/test.h
+test_fstree_init_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/lib/fstree
+test_fstree_init_LDADD = libfstree.a libfstream.a libcompat.a
+
+test_filename_sane_SOURCES = tests/libfstree/filename_sane.c
+test_filename_sane_SOURCES += lib/fstree/filename_sane.c
+
+test_filename_sane_w32_SOURCES = tests/libfstree/filename_sane.c
+test_filename_sane_w32_SOURCES += lib/fstree/filename_sane.c
+test_filename_sane_w32_CPPFLAGS = $(AM_CPPFLAGS) -DTEST_WIN32=1
+
+fstree_fuzz_SOURCES = tests/libfstree/fstree_fuzz.c
+fstree_fuzz_LDADD = libfstree.a libfstream.a libcompat.a
+
+FSTREE_TESTS = \
+ test_canonicalize_name test_mknode_simple test_mknode_slink \
+ test_mknode_reg test_mknode_dir test_gen_inode_numbers \
+ test_add_by_path test_get_path test_fstree_sort test_fstree_from_file \
+ test_fstree_init test_filename_sane test_filename_sane_w32 \
+ test_fstree_from_dir test_fstree_glob1
+
+if BUILD_TOOLS
+check_PROGRAMS += $(FSTREE_TESTS)
+noinst_PROGRAMS += fstree_fuzz
+
+TESTS += $(FSTREE_TESTS)
+endif
+
+EXTRA_DIST += $(FSTDATADIR)/fstree1.txt
+EXTRA_DIST += $(FSTDATADIR)/fstree_glob1.txt $(FSTDATADIR)/fstree_glob2.txt
diff --git a/tests/add_by_path.c b/tests/libfstree/add_by_path.c
index f575011..94c0dc9 100644
--- a/tests/add_by_path.c
+++ b/tests/libfstree/add_by_path.c
@@ -7,7 +7,7 @@
#include "config.h"
#include "fstree.h"
-#include "test.h"
+#include "../test.h"
int main(void)
{
diff --git a/tests/canonicalize_name.c b/tests/libfstree/canonicalize_name.c
index 2ab73a0..37b07e3 100644
--- a/tests/canonicalize_name.c
+++ b/tests/libfstree/canonicalize_name.c
@@ -6,7 +6,7 @@
*/
#include "config.h"
#include "fstree.h"
-#include "test.h"
+#include "../test.h"
static const struct {
const char *in;
diff --git a/tests/filename_sane.c b/tests/libfstree/filename_sane.c
index 86270b3..4d25b33 100644
--- a/tests/filename_sane.c
+++ b/tests/libfstree/filename_sane.c
@@ -6,7 +6,7 @@
*/
#include "config.h"
#include "fstree.h"
-#include "test.h"
+#include "../test.h"
static const char *must_work[] = {
"foobar",
diff --git a/tests/fstree1.txt b/tests/libfstree/fstree1.txt
index 090aff9..090aff9 100644
--- a/tests/fstree1.txt
+++ b/tests/libfstree/fstree1.txt
diff --git a/tests/fstree_from_dir.c b/tests/libfstree/fstree_from_dir.c
index af48d4d..7db1b74 100644
--- a/tests/fstree_from_dir.c
+++ b/tests/libfstree/fstree_from_dir.c
@@ -7,7 +7,7 @@
#include "config.h"
#include "fstree.h"
-#include "test.h"
+#include "../test.h"
static void check_hierarchy(tree_node_t *root, bool recursive)
{
diff --git a/tests/fstree_from_file.c b/tests/libfstree/fstree_from_file.c
index 140ffd7..c8816e6 100644
--- a/tests/fstree_from_file.c
+++ b/tests/libfstree/fstree_from_file.c
@@ -7,7 +7,7 @@
#include "config.h"
#include "fstree.h"
-#include "test.h"
+#include "../test.h"
int main(void)
{
diff --git a/tests/fstree_fuzz.c b/tests/libfstree/fstree_fuzz.c
index ebc8c45..ebc8c45 100644
--- a/tests/fstree_fuzz.c
+++ b/tests/libfstree/fstree_fuzz.c
diff --git a/tests/fstree_glob1.c b/tests/libfstree/fstree_glob1.c
index a3a5074..592180b 100644
--- a/tests/fstree_glob1.c
+++ b/tests/libfstree/fstree_glob1.c
@@ -7,7 +7,7 @@
#include "config.h"
#include "fstree.h"
-#include "test.h"
+#include "../test.h"
static void check_hierarchy(tree_node_t *root, bool recursive)
{
diff --git a/tests/libfstree/fstree_glob1.txt b/tests/libfstree/fstree_glob1.txt
new file mode 100644
index 0000000..b1df979
--- /dev/null
+++ b/tests/libfstree/fstree_glob1.txt
@@ -0,0 +1,2 @@
+dir /tarcorpus 0755 0 0
+glob /tarcorpus 0755 0 0 -type d -- ../libtar/data
diff --git a/tests/libfstree/fstree_glob2.txt b/tests/libfstree/fstree_glob2.txt
new file mode 100644
index 0000000..3c8019b
--- /dev/null
+++ b/tests/libfstree/fstree_glob2.txt
@@ -0,0 +1,3 @@
+dir /tarcorpus 0755 0 0
+glob /tarcorpus 0755 0 0 -type d ../libtar/data
+glob /tarcorpus 0644 0 0 -type f -name "*gnu*.tar" -- ../libtar/data
diff --git a/tests/fstree_init.c b/tests/libfstree/fstree_init.c
index 5970159..a101143 100644
--- a/tests/fstree_init.c
+++ b/tests/libfstree/fstree_init.c
@@ -8,7 +8,7 @@
#include "fstree.h"
#include "internal.h"
-#include "test.h"
+#include "../test.h"
int main(void)
{
diff --git a/tests/fstree_sort.c b/tests/libfstree/fstree_sort.c
index 40a270f..6fc7543 100644
--- a/tests/fstree_sort.c
+++ b/tests/libfstree/fstree_sort.c
@@ -8,7 +8,7 @@
#include "fstree.h"
#include "internal.h"
-#include "test.h"
+#include "../test.h"
int main(void)
{
diff --git a/tests/gen_inode_numbers.c b/tests/libfstree/gen_inode_numbers.c
index 68b06e8..8ee2315 100644
--- a/tests/gen_inode_numbers.c
+++ b/tests/libfstree/gen_inode_numbers.c
@@ -7,7 +7,7 @@
#include "config.h"
#include "fstree.h"
-#include "test.h"
+#include "../test.h"
static tree_node_t *gen_node(tree_node_t *parent, const char *name)
{
diff --git a/tests/get_path.c b/tests/libfstree/get_path.c
index 8ca0ce0..9bf618b 100644
--- a/tests/get_path.c
+++ b/tests/libfstree/get_path.c
@@ -7,7 +7,7 @@
#include "config.h"
#include "fstree.h"
-#include "test.h"
+#include "../test.h"
int main(void)
{
diff --git a/tests/mknode_dir.c b/tests/libfstree/mknode_dir.c
index 9495bb8..be1156f 100644
--- a/tests/mknode_dir.c
+++ b/tests/libfstree/mknode_dir.c
@@ -7,7 +7,7 @@
#include "config.h"
#include "fstree.h"
-#include "test.h"
+#include "../test.h"
int main(void)
{
diff --git a/tests/mknode_reg.c b/tests/libfstree/mknode_reg.c
index 677c934..1f7ec88 100644
--- a/tests/mknode_reg.c
+++ b/tests/libfstree/mknode_reg.c
@@ -7,7 +7,7 @@
#include "config.h"
#include "fstree.h"
-#include "test.h"
+#include "../test.h"
int main(void)
{
diff --git a/tests/mknode_simple.c b/tests/libfstree/mknode_simple.c
index 271ff96..b8505ed 100644
--- a/tests/mknode_simple.c
+++ b/tests/libfstree/mknode_simple.c
@@ -7,7 +7,7 @@
#include "config.h"
#include "fstree.h"
-#include "test.h"
+#include "../test.h"
int main(void)
{
diff --git a/tests/mknode_slink.c b/tests/libfstree/mknode_slink.c
index 19fc8f2..29f2679 100644
--- a/tests/mknode_slink.c
+++ b/tests/libfstree/mknode_slink.c
@@ -7,7 +7,7 @@
#include "config.h"
#include "fstree.h"
-#include "test.h"
+#include "../test.h"
int main(void)
{
diff --git a/tests/libsqfs/Makemodule.am b/tests/libsqfs/Makemodule.am
new file mode 100644
index 0000000..8ca38b1
--- /dev/null
+++ b/tests/libsqfs/Makemodule.am
@@ -0,0 +1,5 @@
+test_abi_SOURCES = tests/libsqfs/abi.c tests/test.h
+test_abi_LDADD = libsquashfs.la
+
+check_PROGRAMS += test_abi
+TESTS += test_abi
diff --git a/tests/abi.c b/tests/libsqfs/abi.c
index 8ae2220..ea0049d 100644
--- a/tests/abi.c
+++ b/tests/libsqfs/abi.c
@@ -7,7 +7,7 @@
#include "config.h"
#include "sqfs/compressor.h"
-#include "test.h"
+#include "../test.h"
int main(void)
{
diff --git a/tests/libtar/Makemodule.am b/tests/libtar/Makemodule.am
new file mode 100644
index 0000000..bc829fb
--- /dev/null
+++ b/tests/libtar/Makemodule.am
@@ -0,0 +1,178 @@
+TARDATADIR=$(top_srcdir)/tests/libtar/data
+
+test_tar_gnu0_SOURCES = tests/libtar/tar_simple.c tests/test.h
+test_tar_gnu0_LDADD = libtar.a libfstream.a libcompat.a
+test_tar_gnu0_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(TARDATADIR)
+test_tar_gnu0_CPPFLAGS += -DTESTFILE=format-acceptance/gnu.tar
+
+test_tar_gnu1_SOURCES = tests/libtar/tar_simple.c tests/test.h
+test_tar_gnu1_LDADD = libtar.a libfstream.a libcompat.a
+test_tar_gnu1_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(TARDATADIR)
+test_tar_gnu1_CPPFLAGS += -DTESTFILE=format-acceptance/gnu-g.tar
+
+test_tar_gnu2_SOURCES = tests/libtar/tar_simple.c tests/test.h
+test_tar_gnu2_LDADD = libtar.a libfstream.a libcompat.a
+test_tar_gnu2_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(TARDATADIR)
+test_tar_gnu2_CPPFLAGS += -DTESTFILE=user-group-largenum/gnu.tar
+test_tar_gnu2_CPPFLAGS += -DTESTUID=0x80000000 -DTESTGID=0x80000000
+test_tar_gnu2_CPPFLAGS += -DTESTTS=1542995392
+
+test_tar_gnu3_SOURCES = tests/libtar/tar_simple.c tests/test.h
+test_tar_gnu3_LDADD = libtar.a libfstream.a libcompat.a
+test_tar_gnu3_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(TARDATADIR)
+test_tar_gnu3_CPPFLAGS += -DTESTFILE=negative-mtime/gnu.tar -DTESTTS=-315622800
+
+test_tar_gnu4_SOURCES = tests/libtar/tar_simple.c tests/test.h
+test_tar_gnu4_LDADD = libtar.a libfstream.a libcompat.a
+test_tar_gnu4_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(TARDATADIR)
+test_tar_gnu4_CPPFLAGS += -DTESTFILE=long-paths/gnu.tar -DLONG_NAME_TEST
+test_tar_gnu4_CPPFLAGS += -DTESTTS=1542909670
+
+test_tar_gnu5_SOURCES = tests/libtar/tar_simple.c tests/test.h
+test_tar_gnu5_LDADD = libtar.a libfstream.a libcompat.a
+test_tar_gnu5_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(TARDATADIR)
+test_tar_gnu5_CPPFLAGS += -DTESTFILE=large-mtime/gnu.tar -DTESTTS=8589934592L
+
+test_tar_gnu6_SOURCES = tests/libtar/tar_big_file.c tests/test.h
+test_tar_gnu6_LDADD = libtar.a libfstream.a libcompat.a
+test_tar_gnu6_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(TARDATADIR)
+test_tar_gnu6_CPPFLAGS += -DTESTFILE=file-size/gnu.tar
+
+test_tar_pax0_SOURCES = tests/libtar/tar_simple.c tests/test.h
+test_tar_pax0_LDADD = libtar.a libfstream.a libcompat.a
+test_tar_pax0_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(TARDATADIR)
+test_tar_pax0_CPPFLAGS += -DTESTFILE=format-acceptance/pax.tar
+
+test_tar_pax1_SOURCES = tests/libtar/tar_simple.c tests/test.h
+test_tar_pax1_LDADD = libtar.a libfstream.a libcompat.a
+test_tar_pax1_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(TARDATADIR)
+test_tar_pax1_CPPFLAGS += -DTESTFILE=user-group-largenum/pax.tar
+test_tar_pax1_CPPFLAGS += -DTESTUID=2147483648UL -DTESTGID=2147483648UL
+test_tar_pax1_CPPFLAGS += -DTESTTS=1542995392
+
+test_tar_pax2_SOURCES = tests/libtar/tar_simple.c tests/test.h
+test_tar_pax2_LDADD = libtar.a libfstream.a libcompat.a
+test_tar_pax2_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(TARDATADIR)
+test_tar_pax2_CPPFLAGS += -DTESTFILE=large-mtime/pax.tar -DTESTTS=8589934592L
+
+test_tar_pax3_SOURCES = tests/libtar/tar_simple.c tests/test.h
+test_tar_pax3_LDADD = libtar.a libfstream.a libcompat.a
+test_tar_pax3_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(TARDATADIR)
+test_tar_pax3_CPPFLAGS += -DTESTFILE=negative-mtime/pax.tar -DTESTTS=-315622800
+
+test_tar_pax4_SOURCES = tests/libtar/tar_simple.c tests/test.h
+test_tar_pax4_LDADD = libtar.a libfstream.a libcompat.a
+test_tar_pax4_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(TARDATADIR)
+test_tar_pax4_CPPFLAGS += -DTESTFILE=long-paths/pax.tar
+test_tar_pax4_CPPFLAGS += -DLONG_NAME_TEST -DTESTTS=1542909670
+
+test_tar_pax5_SOURCES = tests/libtar/tar_big_file.c tests/test.h
+test_tar_pax5_LDADD = libtar.a libfstream.a libcompat.a
+test_tar_pax5_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(TARDATADIR)
+test_tar_pax5_CPPFLAGS += -DTESTFILE=file-size/pax.tar
+
+test_tar_ustar0_SOURCES = tests/libtar/tar_simple.c tests/test.h
+test_tar_ustar0_LDADD = libtar.a libfstream.a libcompat.a
+test_tar_ustar0_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(TARDATADIR)
+test_tar_ustar0_CPPFLAGS += -DTESTFILE=format-acceptance/ustar.tar
+
+test_tar_ustar1_SOURCES = tests/libtar/tar_simple.c tests/test.h
+test_tar_ustar1_LDADD = libtar.a libfstream.a libcompat.a
+test_tar_ustar1_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(TARDATADIR)
+test_tar_ustar1_CPPFLAGS += -DTESTFILE=format-acceptance/ustar-pre-posix.tar
+
+test_tar_ustar2_SOURCES = tests/libtar/tar_simple.c tests/test.h
+test_tar_ustar2_LDADD = libtar.a libfstream.a libcompat.a
+test_tar_ustar2_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(TARDATADIR)
+test_tar_ustar2_CPPFLAGS += -DTESTFILE=format-acceptance/v7.tar
+
+test_tar_ustar3_SOURCES = tests/libtar/tar_simple.c tests/test.h
+test_tar_ustar3_LDADD = libtar.a libfstream.a libcompat.a
+test_tar_ustar3_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(TARDATADIR)
+test_tar_ustar3_CPPFLAGS += -DTESTFILE=user-group-largenum/8-digit.tar
+test_tar_ustar3_CPPFLAGS += -DTESTUID=8388608 -DTESTGID=8388608
+test_tar_ustar3_CPPFLAGS += -DTESTTS=1542995392
+
+test_tar_ustar4_SOURCES = tests/libtar/tar_simple.c tests/test.h
+test_tar_ustar4_LDADD = libtar.a libfstream.a libcompat.a
+test_tar_ustar4_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(TARDATADIR)
+test_tar_ustar4_CPPFLAGS += -DTESTFILE=large-mtime/12-digit.tar
+test_tar_ustar4_CPPFLAGS += -DTESTTS=8589934592L
+
+test_tar_ustar5_SOURCES = tests/libtar/tar_simple.c tests/test.h
+test_tar_ustar5_LDADD = libtar.a libfstream.a libcompat.a
+test_tar_ustar5_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(TARDATADIR)
+test_tar_ustar5_CPPFLAGS += -DTESTFILE=long-paths/ustar.tar
+test_tar_ustar5_CPPFLAGS += -DLONG_NAME_TEST -DTESTTS=1542909670
+
+test_tar_ustar6_SOURCES = tests/libtar/tar_big_file.c tests/test.h
+test_tar_ustar6_LDADD = libtar.a libfstream.a libcompat.a
+test_tar_ustar6_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(TARDATADIR)
+test_tar_ustar6_CPPFLAGS += -DTESTFILE=file-size/12-digit.tar
+
+test_tar_target_filled_SOURCES = tests/libtar/tar_target_filled.c tests/test.h
+test_tar_target_filled_LDADD = libtar.a libfstream.a libcompat.a
+test_tar_target_filled_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(TARDATADIR)
+
+test_tar_sparse_gnu_SOURCES = tests/libtar/tar_sparse_gnu.c tests/test.h
+test_tar_sparse_gnu_LDADD = libtar.a libfstream.a libcompat.a
+test_tar_sparse_gnu_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(TARDATADIR)
+
+test_tar_sparse_gnu0_SOURCES = tests/libtar/tar_sparse.c tests/test.h
+test_tar_sparse_gnu0_LDADD = libtar.a libfstream.a libcompat.a
+test_tar_sparse_gnu0_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(TARDATADIR)
+test_tar_sparse_gnu0_CPPFLAGS += -DTESTFILE=sparse-files/pax-gnu0-0.tar
+
+test_tar_sparse_gnu1_SOURCES = tests/libtar/tar_sparse.c tests/test.h
+test_tar_sparse_gnu1_LDADD = libtar.a libfstream.a libcompat.a
+test_tar_sparse_gnu1_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(TARDATADIR)
+test_tar_sparse_gnu1_CPPFLAGS += -DTESTFILE=sparse-files/pax-gnu0-1.tar
+
+test_tar_sparse_gnu2_SOURCES = tests/libtar/tar_sparse.c tests/test.h
+test_tar_sparse_gnu2_LDADD = libtar.a libfstream.a libcompat.a
+test_tar_sparse_gnu2_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(TARDATADIR)
+test_tar_sparse_gnu2_CPPFLAGS += -DTESTFILE=sparse-files/pax-gnu1-0.tar
+
+test_tar_sparse_gnu3_SOURCES = tests/libtar/tar_sparse.c tests/test.h
+test_tar_sparse_gnu3_LDADD = libtar.a libfstream.a libcompat.a
+test_tar_sparse_gnu3_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(TARDATADIR)
+test_tar_sparse_gnu3_CPPFLAGS += -DTESTFILE=sparse-files/gnu.tar
+
+test_tar_xattr_bsd_SOURCES = tests/libtar/tar_xattr.c tests/test.h
+test_tar_xattr_bsd_LDADD = libtar.a libfstream.a libcompat.a
+test_tar_xattr_bsd_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(TARDATADIR)
+test_tar_xattr_bsd_CPPFLAGS += -DTESTFILE=xattr/xattr-libarchive.tar
+
+test_tar_xattr_schily_SOURCES = tests/libtar/tar_xattr.c tests/test.h
+test_tar_xattr_schily_LDADD = libtar.a libfstream.a libcompat.a
+test_tar_xattr_schily_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(TARDATADIR)
+test_tar_xattr_schily_CPPFLAGS += -DTESTFILE=xattr/xattr-schily.tar
+
+test_tar_xattr_schily_bin_SOURCES = tests/libtar/tar_xattr_bin.c tests/test.h
+test_tar_xattr_schily_bin_LDADD = libtar.a libfstream.a libcompat.a
+test_tar_xattr_schily_bin_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(TARDATADIR)
+test_tar_xattr_schily_bin_CPPFLAGS += -DTESTFILE=xattr/xattr-schily-binary.tar
+
+tar_fuzz_SOURCES = tests/libtar/tar_fuzz.c
+tar_fuzz_LDADD = libtar.a libfstream.a libcompat.a
+
+LIBTAR_TESTS = \
+ test_tar_ustar0 test_tar_ustar1 test_tar_ustar2 test_tar_ustar3 \
+ test_tar_ustar4 test_tar_ustar5 test_tar_ustar6 \
+ test_tar_pax0 test_tar_pax1 test_tar_pax2 test_tar_pax3 test_tar_pax4 \
+ test_tar_pax5 \
+ test_tar_gnu0 test_tar_gnu1 test_tar_gnu2 test_tar_gnu3 test_tar_gnu4 \
+ test_tar_gnu5 test_tar_gnu6 \
+ test_tar_sparse_gnu test_tar_sparse_gnu0 test_tar_sparse_gnu1 \
+ test_tar_sparse_gnu2 test_tar_sparse_gnu3 \
+ test_tar_xattr_bsd test_tar_xattr_schily test_tar_xattr_schily_bin \
+ test_tar_target_filled
+
+if BUILD_TOOLS
+check_PROGRAMS += $(LIBTAR_TESTS)
+TESTS += $(LIBTAR_TESTS)
+
+noinst_PROGRAMS += tar_fuzz
+endif
+
+EXTRA_DIST += $(TARDATADIR)
diff --git a/tests/tar/CREDITS b/tests/libtar/data/CREDITS
index 7a2738f..7a2738f 100644
--- a/tests/tar/CREDITS
+++ b/tests/libtar/data/CREDITS
diff --git a/tests/tar/file-size/12-digit.tar b/tests/libtar/data/file-size/12-digit.tar
index a6b3553..a6b3553 100644
--- a/tests/tar/file-size/12-digit.tar
+++ b/tests/libtar/data/file-size/12-digit.tar
Binary files differ
diff --git a/tests/tar/file-size/gnu.tar b/tests/libtar/data/file-size/gnu.tar
index aad726f..aad726f 100644
--- a/tests/tar/file-size/gnu.tar
+++ b/tests/libtar/data/file-size/gnu.tar
Binary files differ
diff --git a/tests/tar/file-size/pax.tar b/tests/libtar/data/file-size/pax.tar
index e391fee..e391fee 100644
--- a/tests/tar/file-size/pax.tar
+++ b/tests/libtar/data/file-size/pax.tar
Binary files differ
diff --git a/tests/tar/format-acceptance/gnu-g.tar b/tests/libtar/data/format-acceptance/gnu-g.tar
index a72f60d..a72f60d 100644
--- a/tests/tar/format-acceptance/gnu-g.tar
+++ b/tests/libtar/data/format-acceptance/gnu-g.tar
Binary files differ
diff --git a/tests/tar/format-acceptance/gnu.tar b/tests/libtar/data/format-acceptance/gnu.tar
index 98e8157..98e8157 100644
--- a/tests/tar/format-acceptance/gnu.tar
+++ b/tests/libtar/data/format-acceptance/gnu.tar
Binary files differ
diff --git a/tests/tar/format-acceptance/link_filled.tar b/tests/libtar/data/format-acceptance/link_filled.tar
index 9b80f89..9b80f89 100644
--- a/tests/tar/format-acceptance/link_filled.tar
+++ b/tests/libtar/data/format-acceptance/link_filled.tar
Binary files differ
diff --git a/tests/tar/format-acceptance/pax.tar b/tests/libtar/data/format-acceptance/pax.tar
index 69a029f..69a029f 100644
--- a/tests/tar/format-acceptance/pax.tar
+++ b/tests/libtar/data/format-acceptance/pax.tar
Binary files differ
diff --git a/tests/tar/format-acceptance/ustar-pre-posix.tar b/tests/libtar/data/format-acceptance/ustar-pre-posix.tar
index 4230f5f..4230f5f 100644
--- a/tests/tar/format-acceptance/ustar-pre-posix.tar
+++ b/tests/libtar/data/format-acceptance/ustar-pre-posix.tar
Binary files differ
diff --git a/tests/tar/format-acceptance/ustar.tar b/tests/libtar/data/format-acceptance/ustar.tar
index 9a6d9b3..9a6d9b3 100644
--- a/tests/tar/format-acceptance/ustar.tar
+++ b/tests/libtar/data/format-acceptance/ustar.tar
Binary files differ
diff --git a/tests/tar/format-acceptance/v7.tar b/tests/libtar/data/format-acceptance/v7.tar
index 5483b4b..5483b4b 100644
--- a/tests/tar/format-acceptance/v7.tar
+++ b/tests/libtar/data/format-acceptance/v7.tar
Binary files differ
diff --git a/tests/tar/large-mtime/12-digit.tar b/tests/libtar/data/large-mtime/12-digit.tar
index 8202b28..8202b28 100644
--- a/tests/tar/large-mtime/12-digit.tar
+++ b/tests/libtar/data/large-mtime/12-digit.tar
Binary files differ
diff --git a/tests/tar/large-mtime/gnu.tar b/tests/libtar/data/large-mtime/gnu.tar
index 4e3dda2..4e3dda2 100644
--- a/tests/tar/large-mtime/gnu.tar
+++ b/tests/libtar/data/large-mtime/gnu.tar
Binary files differ
diff --git a/tests/tar/large-mtime/pax.tar b/tests/libtar/data/large-mtime/pax.tar
index 8d32530..8d32530 100644
--- a/tests/tar/large-mtime/pax.tar
+++ b/tests/libtar/data/large-mtime/pax.tar
Binary files differ
diff --git a/tests/tar/long-paths/gnu.tar b/tests/libtar/data/long-paths/gnu.tar
index 4eee731..4eee731 100644
--- a/tests/tar/long-paths/gnu.tar
+++ b/tests/libtar/data/long-paths/gnu.tar
Binary files differ
diff --git a/tests/tar/long-paths/pax.tar b/tests/libtar/data/long-paths/pax.tar
index 1e63e9c..1e63e9c 100644
--- a/tests/tar/long-paths/pax.tar
+++ b/tests/libtar/data/long-paths/pax.tar
Binary files differ
diff --git a/tests/tar/long-paths/ustar.tar b/tests/libtar/data/long-paths/ustar.tar
index 812255c..812255c 100644
--- a/tests/tar/long-paths/ustar.tar
+++ b/tests/libtar/data/long-paths/ustar.tar
Binary files differ
diff --git a/tests/tar/negative-mtime/gnu.tar b/tests/libtar/data/negative-mtime/gnu.tar
index a9b1272..a9b1272 100644
--- a/tests/tar/negative-mtime/gnu.tar
+++ b/tests/libtar/data/negative-mtime/gnu.tar
Binary files differ
diff --git a/tests/tar/negative-mtime/pax.tar b/tests/libtar/data/negative-mtime/pax.tar
index d0b3e6c..d0b3e6c 100644
--- a/tests/tar/negative-mtime/pax.tar
+++ b/tests/libtar/data/negative-mtime/pax.tar
Binary files differ
diff --git a/tests/tar/sparse-files/gnu-small.tar b/tests/libtar/data/sparse-files/gnu-small.tar
index 7a1b222..7a1b222 100644
--- a/tests/tar/sparse-files/gnu-small.tar
+++ b/tests/libtar/data/sparse-files/gnu-small.tar
Binary files differ
diff --git a/tests/tar/sparse-files/gnu.tar b/tests/libtar/data/sparse-files/gnu.tar
index 3d641a2..3d641a2 100644
--- a/tests/tar/sparse-files/gnu.tar
+++ b/tests/libtar/data/sparse-files/gnu.tar
Binary files differ
diff --git a/tests/tar/sparse-files/pax-gnu0-0.tar b/tests/libtar/data/sparse-files/pax-gnu0-0.tar
index 628f09e..628f09e 100644
--- a/tests/tar/sparse-files/pax-gnu0-0.tar
+++ b/tests/libtar/data/sparse-files/pax-gnu0-0.tar
Binary files differ
diff --git a/tests/tar/sparse-files/pax-gnu0-1.tar b/tests/libtar/data/sparse-files/pax-gnu0-1.tar
index 87e362e..87e362e 100644
--- a/tests/tar/sparse-files/pax-gnu0-1.tar
+++ b/tests/libtar/data/sparse-files/pax-gnu0-1.tar
Binary files differ
diff --git a/tests/tar/sparse-files/pax-gnu1-0.tar b/tests/libtar/data/sparse-files/pax-gnu1-0.tar
index edb0ccf..edb0ccf 100644
--- a/tests/tar/sparse-files/pax-gnu1-0.tar
+++ b/tests/libtar/data/sparse-files/pax-gnu1-0.tar
Binary files differ
diff --git a/tests/tar/sqfs.sha512 b/tests/libtar/data/sqfs.sha512
index 0abbe82..10df2f4 100644
--- a/tests/tar/sqfs.sha512
+++ b/tests/libtar/data/sqfs.sha512
@@ -1,28 +1,28 @@
-8fcf00ec57c764bd26e2d2c9db7a95acadd96f106ba37395216f0b331a664e8f5f29c70fcab82dc27f61f89237f23f29637930cd4843bfd7a9632d36088034b4 tests/tar/long-paths/gnu.sqfs
-8fcf00ec57c764bd26e2d2c9db7a95acadd96f106ba37395216f0b331a664e8f5f29c70fcab82dc27f61f89237f23f29637930cd4843bfd7a9632d36088034b4 tests/tar/long-paths/pax.sqfs
-8fcf00ec57c764bd26e2d2c9db7a95acadd96f106ba37395216f0b331a664e8f5f29c70fcab82dc27f61f89237f23f29637930cd4843bfd7a9632d36088034b4 tests/tar/long-paths/ustar.sqfs
-9e2241cf26c1457824f3e3c7a0bd2fc1be1e748ec5725afa33acdb63156b948a9db5f7182d00551587d1892565e05742775243be6e7377174f3d21911fdb7d15 tests/tar/sparse-files/gnu-small.sqfs
-5b032c35f80b73f21aef8e9f558c16605676e3e621e927177c4ab0a60ba7441a7501dd21a1c37d43d8432bfa694b6afcbe834a277e2fd8f23315e16bc3cdd86a tests/tar/sparse-files/gnu.sqfs
-5b032c35f80b73f21aef8e9f558c16605676e3e621e927177c4ab0a60ba7441a7501dd21a1c37d43d8432bfa694b6afcbe834a277e2fd8f23315e16bc3cdd86a tests/tar/sparse-files/pax-gnu0-1.sqfs
-5b032c35f80b73f21aef8e9f558c16605676e3e621e927177c4ab0a60ba7441a7501dd21a1c37d43d8432bfa694b6afcbe834a277e2fd8f23315e16bc3cdd86a tests/tar/sparse-files/pax-gnu0-0.sqfs
-5b032c35f80b73f21aef8e9f558c16605676e3e621e927177c4ab0a60ba7441a7501dd21a1c37d43d8432bfa694b6afcbe834a277e2fd8f23315e16bc3cdd86a tests/tar/sparse-files/pax-gnu1-0.sqfs
-1b9525453fb10f266cd7f52300fa2ff586a9b5a1c141da46f72c6370485d4dc7e306f2e778108644cdea6f06ee95a2972325f950ef5fce98bf439db1869c692a tests/tar/large-mtime/12-digit.sqfs
-1b9525453fb10f266cd7f52300fa2ff586a9b5a1c141da46f72c6370485d4dc7e306f2e778108644cdea6f06ee95a2972325f950ef5fce98bf439db1869c692a tests/tar/large-mtime/gnu.sqfs
-1b9525453fb10f266cd7f52300fa2ff586a9b5a1c141da46f72c6370485d4dc7e306f2e778108644cdea6f06ee95a2972325f950ef5fce98bf439db1869c692a tests/tar/large-mtime/pax.sqfs
-b43a83dcd5c9ccef1272caa1c9828e7401d3c19579def2caf9f51e814190662d19fbd0ee0c5c20d02e2d404533c593e5d8a549ac18509ce5e829c33cf6c272b0 tests/tar/negative-mtime/gnu.sqfs
-b43a83dcd5c9ccef1272caa1c9828e7401d3c19579def2caf9f51e814190662d19fbd0ee0c5c20d02e2d404533c593e5d8a549ac18509ce5e829c33cf6c272b0 tests/tar/negative-mtime/pax.sqfs
-d7fd043c8c4614b6b8b430ef8c56fcf35417d6886a3679762b83afcbfa231c9169b514d1da8880e54303df749e0267a606dd3631b4e91bb7cf91d8e71f329687 tests/tar/format-acceptance/gnu-g.sqfs
-d7fd043c8c4614b6b8b430ef8c56fcf35417d6886a3679762b83afcbfa231c9169b514d1da8880e54303df749e0267a606dd3631b4e91bb7cf91d8e71f329687 tests/tar/format-acceptance/gnu.sqfs
-d7fd043c8c4614b6b8b430ef8c56fcf35417d6886a3679762b83afcbfa231c9169b514d1da8880e54303df749e0267a606dd3631b4e91bb7cf91d8e71f329687 tests/tar/format-acceptance/ustar-pre-posix.sqfs
-d7fd043c8c4614b6b8b430ef8c56fcf35417d6886a3679762b83afcbfa231c9169b514d1da8880e54303df749e0267a606dd3631b4e91bb7cf91d8e71f329687 tests/tar/format-acceptance/v7.sqfs
-d7fd043c8c4614b6b8b430ef8c56fcf35417d6886a3679762b83afcbfa231c9169b514d1da8880e54303df749e0267a606dd3631b4e91bb7cf91d8e71f329687 tests/tar/format-acceptance/pax.sqfs
-d7fd043c8c4614b6b8b430ef8c56fcf35417d6886a3679762b83afcbfa231c9169b514d1da8880e54303df749e0267a606dd3631b4e91bb7cf91d8e71f329687 tests/tar/format-acceptance/ustar.sqfs
-2f41b640b8aeec7f5e489fbbeef22bac118c8b1cb068b795433bb6e2f8e9a1ff4f11654e9617b9547ff34b4da7b8e660afcbe69cf630bc112c63693fc56d4e3e tests/tar/format-acceptance/link_filled.sqfs
-f97561018def03e8af41c3b479925052469d4a15645886c500a60a5caa835a1ad152b4e72912df52bde29e3645d6bda46002dd91982c3bc91ff844b5724d0917 tests/tar/user-group-largenum/gnu.sqfs
-b34d720e04bb7c1fb93c9c3520aa1c653992f9b80339de2416097d95603ab7bbc02ea46300823ec3808c0cfe37ed7477f110ac2eb0fd791832a93f3e5c8a1500 tests/tar/user-group-largenum/8-digit.sqfs
-f97561018def03e8af41c3b479925052469d4a15645886c500a60a5caa835a1ad152b4e72912df52bde29e3645d6bda46002dd91982c3bc91ff844b5724d0917 tests/tar/user-group-largenum/pax.sqfs
-2dcfaace3235719558d93ed5a0f3e59fc10ab91f070add8ac8f7c4e6bcf5356942ff9db0fea5d8223280863c6e7b216b218b15dc8a2f61d2d42b62ea605cd0d5 tests/tar/xattr/xattr-schily-binary.sqfs
-273eb1af519f01f116fd0017f6016d50474fe94e596bda8f3e2467e7dd5741fb45fb7df8830d9e62112a24ce8f8a40f8afa6783459ec04f4c0004ca40a050c49 tests/tar/xattr/xattr-schily.sqfs
-273eb1af519f01f116fd0017f6016d50474fe94e596bda8f3e2467e7dd5741fb45fb7df8830d9e62112a24ce8f8a40f8afa6783459ec04f4c0004ca40a050c49 tests/tar/xattr/xattr-libarchive.sqfs
-dabba481b7e0d6888c1cb429eca304aac3c39146910ab0160179947de5ee3b68b5dcca2be3aff4536343357c6c48733f22b26cee1c2d4ff000c2edc276f2c235 tests/tar/xattr/acl.sqfs
+8fcf00ec57c764bd26e2d2c9db7a95acadd96f106ba37395216f0b331a664e8f5f29c70fcab82dc27f61f89237f23f29637930cd4843bfd7a9632d36088034b4 tests/libtar/data/long-paths/gnu.sqfs
+8fcf00ec57c764bd26e2d2c9db7a95acadd96f106ba37395216f0b331a664e8f5f29c70fcab82dc27f61f89237f23f29637930cd4843bfd7a9632d36088034b4 tests/libtar/data/long-paths/pax.sqfs
+8fcf00ec57c764bd26e2d2c9db7a95acadd96f106ba37395216f0b331a664e8f5f29c70fcab82dc27f61f89237f23f29637930cd4843bfd7a9632d36088034b4 tests/libtar/data/long-paths/ustar.sqfs
+9e2241cf26c1457824f3e3c7a0bd2fc1be1e748ec5725afa33acdb63156b948a9db5f7182d00551587d1892565e05742775243be6e7377174f3d21911fdb7d15 tests/libtar/data/sparse-files/gnu-small.sqfs
+5b032c35f80b73f21aef8e9f558c16605676e3e621e927177c4ab0a60ba7441a7501dd21a1c37d43d8432bfa694b6afcbe834a277e2fd8f23315e16bc3cdd86a tests/libtar/data/sparse-files/gnu.sqfs
+5b032c35f80b73f21aef8e9f558c16605676e3e621e927177c4ab0a60ba7441a7501dd21a1c37d43d8432bfa694b6afcbe834a277e2fd8f23315e16bc3cdd86a tests/libtar/data/sparse-files/pax-gnu0-1.sqfs
+5b032c35f80b73f21aef8e9f558c16605676e3e621e927177c4ab0a60ba7441a7501dd21a1c37d43d8432bfa694b6afcbe834a277e2fd8f23315e16bc3cdd86a tests/libtar/data/sparse-files/pax-gnu0-0.sqfs
+5b032c35f80b73f21aef8e9f558c16605676e3e621e927177c4ab0a60ba7441a7501dd21a1c37d43d8432bfa694b6afcbe834a277e2fd8f23315e16bc3cdd86a tests/libtar/data/sparse-files/pax-gnu1-0.sqfs
+1b9525453fb10f266cd7f52300fa2ff586a9b5a1c141da46f72c6370485d4dc7e306f2e778108644cdea6f06ee95a2972325f950ef5fce98bf439db1869c692a tests/libtar/data/large-mtime/12-digit.sqfs
+1b9525453fb10f266cd7f52300fa2ff586a9b5a1c141da46f72c6370485d4dc7e306f2e778108644cdea6f06ee95a2972325f950ef5fce98bf439db1869c692a tests/libtar/data/large-mtime/gnu.sqfs
+1b9525453fb10f266cd7f52300fa2ff586a9b5a1c141da46f72c6370485d4dc7e306f2e778108644cdea6f06ee95a2972325f950ef5fce98bf439db1869c692a tests/libtar/data/large-mtime/pax.sqfs
+b43a83dcd5c9ccef1272caa1c9828e7401d3c19579def2caf9f51e814190662d19fbd0ee0c5c20d02e2d404533c593e5d8a549ac18509ce5e829c33cf6c272b0 tests/libtar/data/negative-mtime/gnu.sqfs
+b43a83dcd5c9ccef1272caa1c9828e7401d3c19579def2caf9f51e814190662d19fbd0ee0c5c20d02e2d404533c593e5d8a549ac18509ce5e829c33cf6c272b0 tests/libtar/data/negative-mtime/pax.sqfs
+d7fd043c8c4614b6b8b430ef8c56fcf35417d6886a3679762b83afcbfa231c9169b514d1da8880e54303df749e0267a606dd3631b4e91bb7cf91d8e71f329687 tests/libtar/data/format-acceptance/gnu-g.sqfs
+d7fd043c8c4614b6b8b430ef8c56fcf35417d6886a3679762b83afcbfa231c9169b514d1da8880e54303df749e0267a606dd3631b4e91bb7cf91d8e71f329687 tests/libtar/data/format-acceptance/gnu.sqfs
+d7fd043c8c4614b6b8b430ef8c56fcf35417d6886a3679762b83afcbfa231c9169b514d1da8880e54303df749e0267a606dd3631b4e91bb7cf91d8e71f329687 tests/libtar/data/format-acceptance/ustar-pre-posix.sqfs
+d7fd043c8c4614b6b8b430ef8c56fcf35417d6886a3679762b83afcbfa231c9169b514d1da8880e54303df749e0267a606dd3631b4e91bb7cf91d8e71f329687 tests/libtar/data/format-acceptance/v7.sqfs
+d7fd043c8c4614b6b8b430ef8c56fcf35417d6886a3679762b83afcbfa231c9169b514d1da8880e54303df749e0267a606dd3631b4e91bb7cf91d8e71f329687 tests/libtar/data/format-acceptance/pax.sqfs
+d7fd043c8c4614b6b8b430ef8c56fcf35417d6886a3679762b83afcbfa231c9169b514d1da8880e54303df749e0267a606dd3631b4e91bb7cf91d8e71f329687 tests/libtar/data/format-acceptance/ustar.sqfs
+2f41b640b8aeec7f5e489fbbeef22bac118c8b1cb068b795433bb6e2f8e9a1ff4f11654e9617b9547ff34b4da7b8e660afcbe69cf630bc112c63693fc56d4e3e tests/libtar/data/format-acceptance/link_filled.sqfs
+f97561018def03e8af41c3b479925052469d4a15645886c500a60a5caa835a1ad152b4e72912df52bde29e3645d6bda46002dd91982c3bc91ff844b5724d0917 tests/libtar/data/user-group-largenum/gnu.sqfs
+b34d720e04bb7c1fb93c9c3520aa1c653992f9b80339de2416097d95603ab7bbc02ea46300823ec3808c0cfe37ed7477f110ac2eb0fd791832a93f3e5c8a1500 tests/libtar/data/user-group-largenum/8-digit.sqfs
+f97561018def03e8af41c3b479925052469d4a15645886c500a60a5caa835a1ad152b4e72912df52bde29e3645d6bda46002dd91982c3bc91ff844b5724d0917 tests/libtar/data/user-group-largenum/pax.sqfs
+2dcfaace3235719558d93ed5a0f3e59fc10ab91f070add8ac8f7c4e6bcf5356942ff9db0fea5d8223280863c6e7b216b218b15dc8a2f61d2d42b62ea605cd0d5 tests/libtar/data/xattr/xattr-schily-binary.sqfs
+273eb1af519f01f116fd0017f6016d50474fe94e596bda8f3e2467e7dd5741fb45fb7df8830d9e62112a24ce8f8a40f8afa6783459ec04f4c0004ca40a050c49 tests/libtar/data/xattr/xattr-schily.sqfs
+273eb1af519f01f116fd0017f6016d50474fe94e596bda8f3e2467e7dd5741fb45fb7df8830d9e62112a24ce8f8a40f8afa6783459ec04f4c0004ca40a050c49 tests/libtar/data/xattr/xattr-libarchive.sqfs
+dabba481b7e0d6888c1cb429eca304aac3c39146910ab0160179947de5ee3b68b5dcca2be3aff4536343357c6c48733f22b26cee1c2d4ff000c2edc276f2c235 tests/libtar/data/xattr/acl.sqfs
a050ee2a296900bcb06d9616d06b1d947d9f26f0b57d6aff318c3dc656810c919f63a24144f890a4fae60268fda19becf9021182f1c0afd8acc0874e720f720e tests/tar2sqfs/root-becomes.sqfs
diff --git a/tests/tar/user-group-largenum/8-digit.tar b/tests/libtar/data/user-group-largenum/8-digit.tar
index a48ea5d..a48ea5d 100644
--- a/tests/tar/user-group-largenum/8-digit.tar
+++ b/tests/libtar/data/user-group-largenum/8-digit.tar
Binary files differ
diff --git a/tests/tar/user-group-largenum/gnu.tar b/tests/libtar/data/user-group-largenum/gnu.tar
index 4c30f57..4c30f57 100644
--- a/tests/tar/user-group-largenum/gnu.tar
+++ b/tests/libtar/data/user-group-largenum/gnu.tar
Binary files differ
diff --git a/tests/tar/user-group-largenum/pax.tar b/tests/libtar/data/user-group-largenum/pax.tar
index a9fe54c..a9fe54c 100644
--- a/tests/tar/user-group-largenum/pax.tar
+++ b/tests/libtar/data/user-group-largenum/pax.tar
Binary files differ
diff --git a/tests/tar/xattr/acl.tar b/tests/libtar/data/xattr/acl.tar
index a65c0af..a65c0af 100644
--- a/tests/tar/xattr/acl.tar
+++ b/tests/libtar/data/xattr/acl.tar
Binary files differ
diff --git a/tests/tar/xattr/xattr-libarchive.tar b/tests/libtar/data/xattr/xattr-libarchive.tar
index 3bd6125..3bd6125 100644
--- a/tests/tar/xattr/xattr-libarchive.tar
+++ b/tests/libtar/data/xattr/xattr-libarchive.tar
Binary files differ
diff --git a/tests/tar/xattr/xattr-schily-binary.tar b/tests/libtar/data/xattr/xattr-schily-binary.tar
index 0312807..0312807 100644
--- a/tests/tar/xattr/xattr-schily-binary.tar
+++ b/tests/libtar/data/xattr/xattr-schily-binary.tar
Binary files differ
diff --git a/tests/tar/xattr/xattr-schily.tar b/tests/libtar/data/xattr/xattr-schily.tar
index 1cf525c..1cf525c 100644
--- a/tests/tar/xattr/xattr-schily.tar
+++ b/tests/libtar/data/xattr/xattr-schily.tar
Binary files differ
diff --git a/tests/tar_big_file.c b/tests/libtar/tar_big_file.c
index c9fbcc5..69263ef 100644
--- a/tests/tar_big_file.c
+++ b/tests/libtar/tar_big_file.c
@@ -6,7 +6,7 @@
*/
#include "config.h"
#include "tar.h"
-#include "test.h"
+#include "../test.h"
int main(void)
{
diff --git a/tests/tar_fuzz.c b/tests/libtar/tar_fuzz.c
index e5f5c0b..e5f5c0b 100644
--- a/tests/tar_fuzz.c
+++ b/tests/libtar/tar_fuzz.c
diff --git a/tests/tar_simple.c b/tests/libtar/tar_simple.c
index fb30205..ffaafea 100644
--- a/tests/tar_simple.c
+++ b/tests/libtar/tar_simple.c
@@ -6,7 +6,7 @@
*/
#include "config.h"
#include "tar.h"
-#include "test.h"
+#include "../test.h"
#ifndef TESTUID
#define TESTUID 1000
diff --git a/tests/tar_sparse.c b/tests/libtar/tar_sparse.c
index 79d2041..c4e1c71 100644
--- a/tests/tar_sparse.c
+++ b/tests/libtar/tar_sparse.c
@@ -6,7 +6,7 @@
*/
#include "config.h"
#include "tar.h"
-#include "test.h"
+#include "../test.h"
static void test_case_sparse(const char *path)
{
diff --git a/tests/tar_sparse_gnu.c b/tests/libtar/tar_sparse_gnu.c
index 536ec21..1405026 100644
--- a/tests/tar_sparse_gnu.c
+++ b/tests/libtar/tar_sparse_gnu.c
@@ -6,7 +6,7 @@
*/
#include "config.h"
#include "tar.h"
-#include "test.h"
+#include "../test.h"
int main(void)
{
diff --git a/tests/tar_target_filled.c b/tests/libtar/tar_target_filled.c
index 3ab2421..0028e5e 100644
--- a/tests/tar_target_filled.c
+++ b/tests/libtar/tar_target_filled.c
@@ -6,7 +6,7 @@
*/
#include "config.h"
#include "tar.h"
-#include "test.h"
+#include "../test.h"
int main(void)
{
diff --git a/tests/tar_xattr.c b/tests/libtar/tar_xattr.c
index d864ba3..70329fe 100644
--- a/tests/tar_xattr.c
+++ b/tests/libtar/tar_xattr.c
@@ -6,7 +6,7 @@
*/
#include "config.h"
#include "tar.h"
-#include "test.h"
+#include "../test.h"
int main(void)
{
diff --git a/tests/tar_xattr_bin.c b/tests/libtar/tar_xattr_bin.c
index 5f45c15..52c407c 100644
--- a/tests/tar_xattr_bin.c
+++ b/tests/libtar/tar_xattr_bin.c
@@ -6,7 +6,7 @@
*/
#include "config.h"
#include "tar.h"
-#include "test.h"
+#include "../test.h"
static const uint8_t value[] = {
0x00, 0x00, 0x00, 0x02,
diff --git a/tests/libutil/Makemodule.am b/tests/libutil/Makemodule.am
new file mode 100644
index 0000000..1153db4
--- /dev/null
+++ b/tests/libutil/Makemodule.am
@@ -0,0 +1,16 @@
+test_str_table_SOURCES = tests/libutil/str_table.c tests/test.h
+test_str_table_LDADD = libutil.a libfstream.a libcompat.a
+test_str_table_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/libutil
+
+test_rbtree_SOURCES = tests/libutil/rbtree.c tests/test.h
+test_rbtree_LDADD = libutil.a libcompat.a
+
+test_xxhash_SOURCES = tests/libutil/xxhash.c
+test_xxhash_LDADD = libutil.a libcompat.a
+
+LIBUTIL_TESTS = \
+ test_str_table test_rbtree test_xxhash
+
+check_PROGRAMS += $(LIBUTIL_TESTS)
+TESTS += $(LIBUTIL_TESTS)
+EXTRA_DIST += $(top_srcdir)/tests/libutil/words.txt
diff --git a/tests/rbtree.c b/tests/libutil/rbtree.c
index fc607a5..173df1c 100644
--- a/tests/rbtree.c
+++ b/tests/libutil/rbtree.c
@@ -7,7 +7,7 @@
#include "config.h"
#include "rbtree.h"
-#include "test.h"
+#include "../test.h"
static int key_compare(const void *a, const void *b)
{
diff --git a/tests/str_table.c b/tests/libutil/str_table.c
index 7bcf4cc..83526af 100644
--- a/tests/str_table.c
+++ b/tests/libutil/str_table.c
@@ -9,7 +9,7 @@
#include "str_table.h"
#include "fstream.h"
#include "compat.h"
-#include "test.h"
+#include "../test.h"
static char *strings[1000];
diff --git a/tests/words.txt b/tests/libutil/words.txt
index 9496e14..9496e14 100644
--- a/tests/words.txt
+++ b/tests/libutil/words.txt
diff --git a/tests/xxhash.c b/tests/libutil/xxhash.c
index a7ab4a9..6e17097 100644
--- a/tests/xxhash.c
+++ b/tests/libutil/xxhash.c
@@ -7,7 +7,7 @@
#include "config.h"
#include "util.h"
-#include "test.h"
+#include "../test.h"
static const struct {
const char *plaintext;
diff --git a/tests/test_tar_sqfs.sh.in b/tests/test_tar_sqfs.sh.in
index c23a217..ad9fba3 100755
--- a/tests/test_tar_sqfs.sh.in
+++ b/tests/test_tar_sqfs.sh.in
@@ -2,9 +2,9 @@
set -e
-TARDIR="@abs_top_srcdir@/tests/tar"
+TARDIR="@abs_top_srcdir@/tests/libtar/data"
TARDIR2="@abs_top_srcdir@/tests/tar2sqfs"
-SHA512FILE="@abs_top_srcdir@/tests/tar/sqfs.sha512"
+SHA512FILE="@abs_top_srcdir@/tests/libtar/data/sqfs.sha512"
TAR2SQFS="@abs_top_builddir@/tar2sqfs"
if [ ! -f "$TAR2SQFS" -a -f "${TAR2SQFS}.exe" ]; then