aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2023-01-31 11:30:46 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2023-01-31 18:04:25 +0100
commit72c8155d9fc0eaeac72c053f46ebb7b231d4596a (patch)
tree5758865289c52fa93f56e3fe743bb40c283c5233
parentcdccc69c62579b0c13b35fad0728079652b8f3c9 (diff)
Reintegrate test code with library code
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
-rw-r--r--.gitignore5
-rw-r--r--Makefile.am10
-rw-r--r--bin/gensquashfs/Makemodule.am64
-rw-r--r--bin/gensquashfs/test/filemap_xattr.c (renamed from tests/gensquashfs/filemap_xattr.c)0
-rw-r--r--bin/gensquashfs/test/fstree1.txt (renamed from tests/gensquashfs/fstree1.txt)0
-rw-r--r--bin/gensquashfs/test/fstree_from_dir.c (renamed from tests/gensquashfs/fstree_from_dir.c)0
-rw-r--r--bin/gensquashfs/test/fstree_from_file.c (renamed from tests/gensquashfs/fstree_from_file.c)0
-rw-r--r--bin/gensquashfs/test/fstree_fuzz.c (renamed from tests/gensquashfs/fstree_fuzz.c)0
-rw-r--r--bin/gensquashfs/test/fstree_glob1.c (renamed from tests/gensquashfs/fstree_glob1.c)0
-rw-r--r--bin/gensquashfs/test/fstree_glob1.txt2
-rw-r--r--bin/gensquashfs/test/fstree_glob2.txt3
-rw-r--r--bin/gensquashfs/test/fstree_glob3.txt2
-rw-r--r--bin/gensquashfs/test/sort_file.c (renamed from tests/gensquashfs/sort_file.c)0
-rw-r--r--bin/gensquashfs/test/testdir/dira/file_a0 (renamed from tests/gensquashfs/testdir/dira/file_a0)0
-rw-r--r--bin/gensquashfs/test/testdir/dira/file_a1 (renamed from tests/gensquashfs/testdir/dira/file_a1)0
-rw-r--r--bin/gensquashfs/test/testdir/dira/file_a2 (renamed from tests/gensquashfs/testdir/dira/file_a2)0
-rw-r--r--bin/gensquashfs/test/testdir/dirb/file_b0 (renamed from tests/gensquashfs/testdir/dirb/file_b0)0
-rw-r--r--bin/gensquashfs/test/testdir/dirb/file_b1 (renamed from tests/gensquashfs/testdir/dirb/file_b1)0
-rw-r--r--bin/gensquashfs/test/testdir/dirb/file_b2 (renamed from tests/gensquashfs/testdir/dirb/file_b2)0
-rw-r--r--bin/gensquashfs/test/testdir/dirc/file_c0 (renamed from tests/gensquashfs/testdir/dirc/file_c0)0
-rw-r--r--bin/gensquashfs/test/testdir/dirc/file_c1 (renamed from tests/gensquashfs/testdir/dirc/file_c1)0
-rw-r--r--bin/gensquashfs/test/testdir/dirc/file_c2 (renamed from tests/gensquashfs/testdir/dirc/file_c2)0
-rw-r--r--bin/gensquashfs/test/xattr1.txt (renamed from tests/gensquashfs/xattr1.txt)0
-rw-r--r--bin/rdsquashfs/Makemodule.am8
-rw-r--r--bin/rdsquashfs/test/pathtraversal.sh.in (renamed from tests/rdsquashfs/pathtraversal.sh.in)2
-rw-r--r--bin/rdsquashfs/test/pathtraversal.sqfs (renamed from tests/rdsquashfs/pathtraversal.sqfs)bin4096 -> 4096 bytes
-rw-r--r--bin/tar2sqfs/Makemodule.am6
-rw-r--r--bin/tar2sqfs/test/simple.tar (renamed from tests/tar2sqfs/simple.tar)bin20480 -> 20480 bytes
-rw-r--r--bin/tar2sqfs/test/sqfs.sha512 (renamed from tests/tar2sqfs/sqfs.sha512)56
-rwxr-xr-xbin/tar2sqfs/test/test_tar_sqfs.sh.in (renamed from tests/tar2sqfs/test_tar_sqfs.sh.in)20
-rw-r--r--configure.ac8
-rw-r--r--lib/fstree/Makemodule.am36
-rw-r--r--lib/fstree/test/add_by_path.c (renamed from tests/libfstree/add_by_path.c)0
-rw-r--r--lib/fstree/test/fstree_init.c (renamed from tests/libfstree/fstree_init.c)0
-rw-r--r--lib/fstree/test/fstree_sort.c (renamed from tests/libfstree/fstree_sort.c)0
-rw-r--r--lib/fstree/test/gen_inode_numbers.c (renamed from tests/libfstree/gen_inode_numbers.c)0
-rw-r--r--lib/fstree/test/get_path.c (renamed from tests/libfstree/get_path.c)0
-rw-r--r--lib/fstree/test/mknode_dir.c (renamed from tests/libfstree/mknode_dir.c)0
-rw-r--r--lib/fstree/test/mknode_reg.c (renamed from tests/libfstree/mknode_reg.c)0
-rw-r--r--lib/fstree/test/mknode_simple.c (renamed from tests/libfstree/mknode_simple.c)0
-rw-r--r--lib/fstree/test/mknode_slink.c (renamed from tests/libfstree/mknode_slink.c)0
-rw-r--r--lib/io/Makemodule.am13
-rw-r--r--lib/io/test/get_line.c (renamed from tests/libio/get_line.c)0
-rw-r--r--lib/io/test/get_line.txt (renamed from tests/libio/get_line.txt)0
-rw-r--r--lib/io/test/sparse_fb.c (renamed from tests/libio/sparse_fb.c)0
-rw-r--r--lib/sqfs/Makemodule.am23
-rw-r--r--lib/sqfs/test/abi.c (renamed from tests/libsqfs/abi.c)0
-rw-r--r--lib/sqfs/test/get_node_path.c (renamed from tests/libsqfs/get_node_path.c)0
-rw-r--r--lib/sqfs/test/table.c (renamed from tests/libsqfs/table.c)0
-rw-r--r--lib/sqfs/test/xattr_benchmark.c (renamed from tests/libsqfs/xattr_benchmark.c)0
-rw-r--r--lib/sqfs/test/xattr_writer.c (renamed from tests/libsqfs/xattr_writer.c)0
-rw-r--r--lib/tar/Makemodule.am177
-rw-r--r--lib/tar/test/data/CREDITS (renamed from tests/libtar/data/CREDITS)0
-rw-r--r--lib/tar/test/data/file-size/12-digit.tar (renamed from tests/libtar/data/file-size/12-digit.tar)bin2048 -> 2048 bytes
-rw-r--r--lib/tar/test/data/file-size/gnu.tar (renamed from tests/libtar/data/file-size/gnu.tar)bin2048 -> 2048 bytes
-rw-r--r--lib/tar/test/data/file-size/pax.tar (renamed from tests/libtar/data/file-size/pax.tar)bin2048 -> 2048 bytes
-rw-r--r--lib/tar/test/data/format-acceptance/gnu-g.tar (renamed from tests/libtar/data/format-acceptance/gnu-g.tar)bin2048 -> 2048 bytes
-rw-r--r--lib/tar/test/data/format-acceptance/gnu.tar (renamed from tests/libtar/data/format-acceptance/gnu.tar)bin2048 -> 2048 bytes
-rw-r--r--lib/tar/test/data/format-acceptance/link_filled.tar (renamed from tests/libtar/data/format-acceptance/link_filled.tar)bin10240 -> 10240 bytes
-rw-r--r--lib/tar/test/data/format-acceptance/pax.tar (renamed from tests/libtar/data/format-acceptance/pax.tar)bin3072 -> 3072 bytes
-rw-r--r--lib/tar/test/data/format-acceptance/ustar-pre-posix.tar (renamed from tests/libtar/data/format-acceptance/ustar-pre-posix.tar)bin2048 -> 2048 bytes
-rw-r--r--lib/tar/test/data/format-acceptance/ustar.tar (renamed from tests/libtar/data/format-acceptance/ustar.tar)bin2048 -> 2048 bytes
-rw-r--r--lib/tar/test/data/format-acceptance/v7.tar (renamed from tests/libtar/data/format-acceptance/v7.tar)bin2048 -> 2048 bytes
-rw-r--r--lib/tar/test/data/large-mtime/12-digit.tar (renamed from tests/libtar/data/large-mtime/12-digit.tar)bin2048 -> 2048 bytes
-rw-r--r--lib/tar/test/data/large-mtime/gnu.tar (renamed from tests/libtar/data/large-mtime/gnu.tar)bin2048 -> 2048 bytes
-rw-r--r--lib/tar/test/data/large-mtime/pax.tar (renamed from tests/libtar/data/large-mtime/pax.tar)bin3072 -> 3072 bytes
-rw-r--r--lib/tar/test/data/long-paths/gnu.tar (renamed from tests/libtar/data/long-paths/gnu.tar)bin3072 -> 3072 bytes
-rw-r--r--lib/tar/test/data/long-paths/pax.tar (renamed from tests/libtar/data/long-paths/pax.tar)bin3072 -> 3072 bytes
-rw-r--r--lib/tar/test/data/long-paths/ustar.tar (renamed from tests/libtar/data/long-paths/ustar.tar)bin2048 -> 2048 bytes
-rw-r--r--lib/tar/test/data/negative-mtime/gnu.tar (renamed from tests/libtar/data/negative-mtime/gnu.tar)bin10240 -> 10240 bytes
-rw-r--r--lib/tar/test/data/negative-mtime/pax.tar (renamed from tests/libtar/data/negative-mtime/pax.tar)bin10240 -> 10240 bytes
-rw-r--r--lib/tar/test/data/sparse-files/gnu-small.tar (renamed from tests/libtar/data/sparse-files/gnu-small.tar)bin9728 -> 9728 bytes
-rw-r--r--lib/tar/test/data/sparse-files/gnu.tar (renamed from tests/libtar/data/sparse-files/gnu.tar)bin34816 -> 34816 bytes
-rw-r--r--lib/tar/test/data/sparse-files/pax-gnu0-0.tar (renamed from tests/libtar/data/sparse-files/pax-gnu0-0.tar)bin35840 -> 35840 bytes
-rw-r--r--lib/tar/test/data/sparse-files/pax-gnu0-1.tar (renamed from tests/libtar/data/sparse-files/pax-gnu0-1.tar)bin35328 -> 35328 bytes
-rw-r--r--lib/tar/test/data/sparse-files/pax-gnu1-0.tar (renamed from tests/libtar/data/sparse-files/pax-gnu1-0.tar)bin35840 -> 35840 bytes
-rw-r--r--lib/tar/test/data/user-group-largenum/8-digit.tar (renamed from tests/libtar/data/user-group-largenum/8-digit.tar)bin2048 -> 2048 bytes
-rw-r--r--lib/tar/test/data/user-group-largenum/gnu.tar (renamed from tests/libtar/data/user-group-largenum/gnu.tar)bin2048 -> 2048 bytes
-rw-r--r--lib/tar/test/data/user-group-largenum/pax.tar (renamed from tests/libtar/data/user-group-largenum/pax.tar)bin3072 -> 3072 bytes
-rw-r--r--lib/tar/test/data/xattr/acl.tar (renamed from tests/libtar/data/xattr/acl.tar)bin3072 -> 3072 bytes
-rw-r--r--lib/tar/test/data/xattr/xattr-libarchive.tar (renamed from tests/libtar/data/xattr/xattr-libarchive.tar)bin3072 -> 3072 bytes
-rw-r--r--lib/tar/test/data/xattr/xattr-schily-binary.tar (renamed from tests/libtar/data/xattr/xattr-schily-binary.tar)bin3072 -> 3072 bytes
-rw-r--r--lib/tar/test/data/xattr/xattr-schily.tar (renamed from tests/libtar/data/xattr/xattr-schily.tar)bin3072 -> 3072 bytes
-rw-r--r--lib/tar/test/tar_big_file.c (renamed from tests/libtar/tar_big_file.c)0
-rw-r--r--lib/tar/test/tar_fuzz.c (renamed from tests/libtar/tar_fuzz.c)0
-rw-r--r--lib/tar/test/tar_simple.c (renamed from tests/libtar/tar_simple.c)0
-rw-r--r--lib/tar/test/tar_sparse.c (renamed from tests/libtar/tar_sparse.c)0
-rw-r--r--lib/tar/test/tar_sparse_gnu.c (renamed from tests/libtar/tar_sparse_gnu.c)0
-rw-r--r--lib/tar/test/tar_target_filled.c (renamed from tests/libtar/tar_target_filled.c)0
-rw-r--r--lib/tar/test/tar_xattr.c (renamed from tests/libtar/tar_xattr.c)0
-rw-r--r--lib/tar/test/tar_xattr_bin.c (renamed from tests/libtar/tar_xattr_bin.c)0
-rw-r--r--lib/util/Makemodule.am52
-rw-r--r--lib/util/test/base64_decode.c (renamed from tests/libutil/base64_decode.c)0
-rw-r--r--lib/util/test/canonicalize_name.c (renamed from tests/libutil/canonicalize_name.c)0
-rw-r--r--lib/util/test/epoch.c (renamed from tests/libutil/epoch.c)0
-rw-r--r--lib/util/test/filename_sane.c (renamed from tests/libutil/filename_sane.c)0
-rw-r--r--lib/util/test/hex_decode.c (renamed from tests/libutil/hex_decode.c)0
-rw-r--r--lib/util/test/is_memory_zero.c (renamed from tests/libutil/is_memory_zero.c)0
-rw-r--r--lib/util/test/rbtree.c (renamed from tests/libutil/rbtree.c)0
-rw-r--r--lib/util/test/str_table.c (renamed from tests/libutil/str_table.c)0
-rw-r--r--lib/util/test/threadpool.c (renamed from tests/libutil/threadpool.c)0
-rw-r--r--lib/util/test/words.txt (renamed from tests/libutil/words.txt)0
-rw-r--r--lib/util/test/xxhash.c (renamed from tests/libutil/xxhash.c)0
-rw-r--r--lib/xfrm/Makemodule.am46
-rw-r--r--lib/xfrm/test/pack.c (renamed from tests/libxfrm/pack.c)0
-rw-r--r--lib/xfrm/test/unpack.c (renamed from tests/libxfrm/unpack.c)0
-rw-r--r--tests/gensquashfs/Makemodule.am63
-rw-r--r--tests/gensquashfs/fstree_glob1.txt2
-rw-r--r--tests/gensquashfs/fstree_glob2.txt3
-rw-r--r--tests/gensquashfs/fstree_glob3.txt2
-rw-r--r--tests/libfstree/Makemodule.am38
-rw-r--r--tests/libio/Makemodule.am12
-rw-r--r--tests/libsqfs/Makemodule.am22
-rw-r--r--tests/libtar/Makemodule.am176
-rw-r--r--tests/libutil/Makemodule.am51
-rw-r--r--tests/libxfrm/Makemodule.am55
-rw-r--r--tests/rdsquashfs/Makemodule.am7
-rw-r--r--tests/tar2sqfs/Makemodule.am5
118 files changed, 472 insertions, 497 deletions
diff --git a/.gitignore b/.gitignore
index add3529..3a91d69 100644
--- a/.gitignore
+++ b/.gitignore
@@ -41,9 +41,8 @@ ltmain.sh
m4/libtool.m4
m4/lt*.m4
Doxyfile
-tests/*.sh
-tests/rdsquashfs/*.sh
-tests/tar2sqfs/*.sh
+bin/rdsquashfs/test/*.sh
+bin/tar2sqfs/test/*.sh
/mknastyfs
/mk42sqfs
/extract_one
diff --git a/Makefile.am b/Makefile.am
index 7117744..141973e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -42,16 +42,6 @@ include bin/tar2sqfs/Makemodule.am
include extras/Makemodule.am
-include tests/libutil/Makemodule.am
-include tests/libio/Makemodule.am
-include tests/libfstree/Makemodule.am
-include tests/libtar/Makemodule.am
-include tests/libxfrm/Makemodule.am
-include tests/libsqfs/Makemodule.am
-include tests/gensquashfs/Makemodule.am
-include tests/rdsquashfs/Makemodule.am
-include tests/tar2sqfs/Makemodule.am
-
if HAVE_DOXYGEN
@DX_RULES@
diff --git a/bin/gensquashfs/Makemodule.am b/bin/gensquashfs/Makemodule.am
index 7edc39a..052f692 100644
--- a/bin/gensquashfs/Makemodule.am
+++ b/bin/gensquashfs/Makemodule.am
@@ -17,3 +17,67 @@ endif
dist_man1_MANS += bin/gensquashfs/gensquashfs.1
bin_PROGRAMS += gensquashfs
+
+GENDATADIR=$(top_srcdir)/bin/gensquashfs/test
+
+test_filemap_xattr_SOURCES = bin/gensquashfs/test/filemap_xattr.c \
+ bin/gensquashfs/src/filemap_xattr.c \
+ bin/gensquashfs/src/mkfs.h
+test_filemap_xattr_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/bin/gensquashfs/src
+test_filemap_xattr_CPPFLAGS += -DTESTPATH=$(GENDATADIR)/xattr1.txt
+test_filemap_xattr_LDADD = libsquashfs.la libfstree.a libutil.a
+test_filemap_xattr_LDADD += libio.a libcompat.a
+
+test_fstree_from_file_SOURCES = bin/gensquashfs/test/fstree_from_file.c \
+ bin/gensquashfs/src/fstree_from_file.c \
+ bin/gensquashfs/src/fstree_from_dir.c \
+ bin/gensquashfs/src/mkfs.h
+test_fstree_from_file_CPPFLAGS = $(AM_CPPFLAGS)
+test_fstree_from_file_CPPFLAGS += -I$(top_srcdir)/bin/gensquashfs/src
+test_fstree_from_file_CPPFLAGS += -DTESTPATH=$(GENDATADIR)/fstree1.txt
+test_fstree_from_file_LDADD = libfstree.a libio.a libutil.a libcompat.a
+
+test_fstree_glob1_SOURCES = bin/gensquashfs/test/fstree_glob1.c \
+ bin/gensquashfs/src/fstree_from_file.c \
+ bin/gensquashfs/src/fstree_from_dir.c \
+ bin/gensquashfs/src/mkfs.h
+test_fstree_glob1_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/bin/gensquashfs/src
+test_fstree_glob1_CPPFLAGS += -DTESTPATH=$(GENDATADIR)
+test_fstree_glob1_LDADD = libfstree.a libio.a libutil.a libcompat.a
+
+test_fstree_from_dir_SOURCES = bin/gensquashfs/test/fstree_from_dir.c \
+ bin/gensquashfs/src/fstree_from_dir.c \
+ bin/gensquashfs/src/mkfs.h
+test_fstree_from_dir_CPPFLAGS = $(AM_CPPFLAGS)
+test_fstree_from_dir_CPPFLAGS += -I$(top_srcdir)/bin/gensquashfs/src
+test_fstree_from_dir_CPPFLAGS += -DTESTPATH=$(GENDATADIR)/testdir
+test_fstree_from_dir_LDADD = libfstree.a libutil.a libcompat.a
+
+test_sort_file_SOURCES = bin/gensquashfs/test/sort_file.c \
+ bin/gensquashfs/src/fstree_from_file.c \
+ bin/gensquashfs/src/fstree_from_dir.c \
+ bin/gensquashfs/src/sort_by_file.c \
+ bin/gensquashfs/src/mkfs.h
+test_sort_file_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/bin/gensquashfs/src
+test_sort_file_LDADD = libfstree.a libio.a libutil.a libcompat.a
+
+fstree_fuzz_SOURCES = bin/gensquashfs/test/fstree_fuzz.c \
+ bin/gensquashfs/src/fstree_from_file.c \
+ bin/gensquashfs/src/fstree_from_dir.c \
+ bin/gensquashfs/src/mkfs.h
+fstree_fuzz_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/bin/gensquashfs/src
+fstree_fuzz_LDADD = libfstree.a libio.a libutil.a libcompat.a
+
+GENSQUASHFS_TESTS = \
+ test_filemap_xattr test_fstree_from_file test_fstree_from_dir \
+ test_fstree_glob1 test_sort_file
+
+noinst_PROGRAMS += fstree_fuzz
+
+check_PROGRAMS += $(GENSQUASHFS_TESTS)
+TESTS += $(GENSQUASHFS_TESTS)
+
+EXTRA_DIST += $(GENDATADIR)/xattr1.txt $(GENDATADIR)/fstree1.txt
+EXTRA_DIST += $(GENDATADIR)/fstree_glob1.txt $(GENDATADIR)/fstree_glob2.txt
+EXTRA_DIST += $(GENDATADIR)/fstree_glob3.txt
+EXTRA_DIST += $(GENDATADIR)/testdir
diff --git a/tests/gensquashfs/filemap_xattr.c b/bin/gensquashfs/test/filemap_xattr.c
index d258d89..d258d89 100644
--- a/tests/gensquashfs/filemap_xattr.c
+++ b/bin/gensquashfs/test/filemap_xattr.c
diff --git a/tests/gensquashfs/fstree1.txt b/bin/gensquashfs/test/fstree1.txt
index 95ee469..95ee469 100644
--- a/tests/gensquashfs/fstree1.txt
+++ b/bin/gensquashfs/test/fstree1.txt
diff --git a/tests/gensquashfs/fstree_from_dir.c b/bin/gensquashfs/test/fstree_from_dir.c
index 5e73fa4..5e73fa4 100644
--- a/tests/gensquashfs/fstree_from_dir.c
+++ b/bin/gensquashfs/test/fstree_from_dir.c
diff --git a/tests/gensquashfs/fstree_from_file.c b/bin/gensquashfs/test/fstree_from_file.c
index 2a9ba1e..2a9ba1e 100644
--- a/tests/gensquashfs/fstree_from_file.c
+++ b/bin/gensquashfs/test/fstree_from_file.c
diff --git a/tests/gensquashfs/fstree_fuzz.c b/bin/gensquashfs/test/fstree_fuzz.c
index 4fbb72b..4fbb72b 100644
--- a/tests/gensquashfs/fstree_fuzz.c
+++ b/bin/gensquashfs/test/fstree_fuzz.c
diff --git a/tests/gensquashfs/fstree_glob1.c b/bin/gensquashfs/test/fstree_glob1.c
index fbcbf91..fbcbf91 100644
--- a/tests/gensquashfs/fstree_glob1.c
+++ b/bin/gensquashfs/test/fstree_glob1.c
diff --git a/bin/gensquashfs/test/fstree_glob1.txt b/bin/gensquashfs/test/fstree_glob1.txt
new file mode 100644
index 0000000..e3e2902
--- /dev/null
+++ b/bin/gensquashfs/test/fstree_glob1.txt
@@ -0,0 +1,2 @@
+dir /tarcorpus 0755 0 0
+glob /tarcorpus 0755 0 0 -type d -- ../../../lib/tar/test/data
diff --git a/bin/gensquashfs/test/fstree_glob2.txt b/bin/gensquashfs/test/fstree_glob2.txt
new file mode 100644
index 0000000..7c9bd1a
--- /dev/null
+++ b/bin/gensquashfs/test/fstree_glob2.txt
@@ -0,0 +1,3 @@
+dir /tarcorpus 0755 0 0
+glob /tarcorpus 0755 0 0 -type d ../../../lib/tar/test/data
+glob /tarcorpus 0644 0 0 -type f -name "*gnu*.tar" -- ../../../lib/tar/test/data
diff --git a/bin/gensquashfs/test/fstree_glob3.txt b/bin/gensquashfs/test/fstree_glob3.txt
new file mode 100644
index 0000000..9ef48cf
--- /dev/null
+++ b/bin/gensquashfs/test/fstree_glob3.txt
@@ -0,0 +1,2 @@
+glob / 0755 0 0 -type d ../../../lib/tar/test/data
+glob / 0644 0 0 -type f -name "*gnu*.tar" -- ../../../lib/tar/test/data
diff --git a/tests/gensquashfs/sort_file.c b/bin/gensquashfs/test/sort_file.c
index 951328e..951328e 100644
--- a/tests/gensquashfs/sort_file.c
+++ b/bin/gensquashfs/test/sort_file.c
diff --git a/tests/gensquashfs/testdir/dira/file_a0 b/bin/gensquashfs/test/testdir/dira/file_a0
index e69de29..e69de29 100644
--- a/tests/gensquashfs/testdir/dira/file_a0
+++ b/bin/gensquashfs/test/testdir/dira/file_a0
diff --git a/tests/gensquashfs/testdir/dira/file_a1 b/bin/gensquashfs/test/testdir/dira/file_a1
index e69de29..e69de29 100644
--- a/tests/gensquashfs/testdir/dira/file_a1
+++ b/bin/gensquashfs/test/testdir/dira/file_a1
diff --git a/tests/gensquashfs/testdir/dira/file_a2 b/bin/gensquashfs/test/testdir/dira/file_a2
index e69de29..e69de29 100644
--- a/tests/gensquashfs/testdir/dira/file_a2
+++ b/bin/gensquashfs/test/testdir/dira/file_a2
diff --git a/tests/gensquashfs/testdir/dirb/file_b0 b/bin/gensquashfs/test/testdir/dirb/file_b0
index e69de29..e69de29 100644
--- a/tests/gensquashfs/testdir/dirb/file_b0
+++ b/bin/gensquashfs/test/testdir/dirb/file_b0
diff --git a/tests/gensquashfs/testdir/dirb/file_b1 b/bin/gensquashfs/test/testdir/dirb/file_b1
index e69de29..e69de29 100644
--- a/tests/gensquashfs/testdir/dirb/file_b1
+++ b/bin/gensquashfs/test/testdir/dirb/file_b1
diff --git a/tests/gensquashfs/testdir/dirb/file_b2 b/bin/gensquashfs/test/testdir/dirb/file_b2
index e69de29..e69de29 100644
--- a/tests/gensquashfs/testdir/dirb/file_b2
+++ b/bin/gensquashfs/test/testdir/dirb/file_b2
diff --git a/tests/gensquashfs/testdir/dirc/file_c0 b/bin/gensquashfs/test/testdir/dirc/file_c0
index e69de29..e69de29 100644
--- a/tests/gensquashfs/testdir/dirc/file_c0
+++ b/bin/gensquashfs/test/testdir/dirc/file_c0
diff --git a/tests/gensquashfs/testdir/dirc/file_c1 b/bin/gensquashfs/test/testdir/dirc/file_c1
index e69de29..e69de29 100644
--- a/tests/gensquashfs/testdir/dirc/file_c1
+++ b/bin/gensquashfs/test/testdir/dirc/file_c1
diff --git a/tests/gensquashfs/testdir/dirc/file_c2 b/bin/gensquashfs/test/testdir/dirc/file_c2
index e69de29..e69de29 100644
--- a/tests/gensquashfs/testdir/dirc/file_c2
+++ b/bin/gensquashfs/test/testdir/dirc/file_c2
diff --git a/tests/gensquashfs/xattr1.txt b/bin/gensquashfs/test/xattr1.txt
index ffe5fec..ffe5fec 100644
--- a/tests/gensquashfs/xattr1.txt
+++ b/bin/gensquashfs/test/xattr1.txt
diff --git a/bin/rdsquashfs/Makemodule.am b/bin/rdsquashfs/Makemodule.am
index f8f9d3d..380883e 100644
--- a/bin/rdsquashfs/Makemodule.am
+++ b/bin/rdsquashfs/Makemodule.am
@@ -9,3 +9,11 @@ rdsquashfs_LDADD += libfstree.a $(LZO_LIBS) $(PTHREAD_LIBS)
dist_man1_MANS += bin/rdsquashfs/rdsquashfs.1
bin_PROGRAMS += rdsquashfs
+
+if WINDOWS
+else
+check_SCRIPTS += bin/rdsquashfs/test/pathtraversal.sh
+TESTS += bin/rdsquashfs/test/pathtraversal.sh
+endif
+
+EXTRA_DIST += $(top_srcdir)/bin/rdsquashfs/test/pathtraversal.sqfs
diff --git a/tests/rdsquashfs/pathtraversal.sh.in b/bin/rdsquashfs/test/pathtraversal.sh.in
index 6dd9fab..5b19c4d 100644
--- a/tests/rdsquashfs/pathtraversal.sh.in
+++ b/bin/rdsquashfs/test/pathtraversal.sh.in
@@ -1,7 +1,7 @@
#!/bin/sh
RDSQFS="@abs_top_builddir@/rdsquashfs"
-REFFILE="@abs_top_srcdir@/tests/rdsquashfs/pathtraversal.sqfs"
+REFFILE="@abs_top_srcdir@/bin/rdsquashfs/test/pathtraversal.sqfs"
GOTCHA="/tmp/gotcha.txt"
if "$RDSQFS" -u / -p . "$REFFILE"; then
diff --git a/tests/rdsquashfs/pathtraversal.sqfs b/bin/rdsquashfs/test/pathtraversal.sqfs
index 0c33bb3..0c33bb3 100644
--- a/tests/rdsquashfs/pathtraversal.sqfs
+++ b/bin/rdsquashfs/test/pathtraversal.sqfs
Binary files differ
diff --git a/bin/tar2sqfs/Makemodule.am b/bin/tar2sqfs/Makemodule.am
index c8f52ea..920b226 100644
--- a/bin/tar2sqfs/Makemodule.am
+++ b/bin/tar2sqfs/Makemodule.am
@@ -8,3 +8,9 @@ tar2sqfs_LDADD += $(PTHREAD_LIBS)
dist_man1_MANS += bin/tar2sqfs/tar2sqfs.1
bin_PROGRAMS += tar2sqfs
+
+check_SCRIPTS += bin/tar2sqfs/test/test_tar_sqfs.sh
+TESTS += bin/tar2sqfs/test/test_tar_sqfs.sh
+
+EXTRA_DIST += $(top_srcdir)/bin/tar2sqfs/test/simple.tar
+EXTRA_DIST += $(top_srcdir)/bin/tar2sqfs/test/sqfs.sha512
diff --git a/tests/tar2sqfs/simple.tar b/bin/tar2sqfs/test/simple.tar
index ba1020b..ba1020b 100644
--- a/tests/tar2sqfs/simple.tar
+++ b/bin/tar2sqfs/test/simple.tar
Binary files differ
diff --git a/tests/tar2sqfs/sqfs.sha512 b/bin/tar2sqfs/test/sqfs.sha512
index a653090..609e154 100644
--- a/tests/tar2sqfs/sqfs.sha512
+++ b/bin/tar2sqfs/test/sqfs.sha512
@@ -1,28 +1,28 @@
-6217c207d51e38bd819ff70047a070d0172c2e1cc97ba5feb578a2429d1c911bd7990ea845b28389a956754e52e5693beba38c124bf6d7452522361a81c2da09 tests/libtar/data/long-paths/gnu.sqfs
-6217c207d51e38bd819ff70047a070d0172c2e1cc97ba5feb578a2429d1c911bd7990ea845b28389a956754e52e5693beba38c124bf6d7452522361a81c2da09 tests/libtar/data/long-paths/pax.sqfs
-6217c207d51e38bd819ff70047a070d0172c2e1cc97ba5feb578a2429d1c911bd7990ea845b28389a956754e52e5693beba38c124bf6d7452522361a81c2da09 tests/libtar/data/long-paths/ustar.sqfs
-2e2cd5fa04304c5765d7bb54c30273be6cd7414150ae95d217efcec1fbaa7486b4e752adb95e0dddd5329355132baaa7260dc958eb4418158a249929e89b0581 tests/libtar/data/sparse-files/gnu-small.sqfs
-f48a79c58db4d3553ffde5bd3780bb34c12fd0ee703aba95a40588c1cf7b5a679ea16d2a842a11e262bd14c2f0b4dd256436dcfc72a177a455427f93b504eae6 tests/libtar/data/sparse-files/gnu.sqfs
-f48a79c58db4d3553ffde5bd3780bb34c12fd0ee703aba95a40588c1cf7b5a679ea16d2a842a11e262bd14c2f0b4dd256436dcfc72a177a455427f93b504eae6 tests/libtar/data/sparse-files/pax-gnu0-1.sqfs
-f48a79c58db4d3553ffde5bd3780bb34c12fd0ee703aba95a40588c1cf7b5a679ea16d2a842a11e262bd14c2f0b4dd256436dcfc72a177a455427f93b504eae6 tests/libtar/data/sparse-files/pax-gnu0-0.sqfs
-f48a79c58db4d3553ffde5bd3780bb34c12fd0ee703aba95a40588c1cf7b5a679ea16d2a842a11e262bd14c2f0b4dd256436dcfc72a177a455427f93b504eae6 tests/libtar/data/sparse-files/pax-gnu1-0.sqfs
-194384a9a3683ef751f45ca9f380790b3bd9c234a839ff72b09c778f96fe521be9d816c7d3179edf936ec35cd66fad2485b03482468629baa3290a1475c72147 tests/libtar/data/large-mtime/12-digit.sqfs
-194384a9a3683ef751f45ca9f380790b3bd9c234a839ff72b09c778f96fe521be9d816c7d3179edf936ec35cd66fad2485b03482468629baa3290a1475c72147 tests/libtar/data/large-mtime/gnu.sqfs
-194384a9a3683ef751f45ca9f380790b3bd9c234a839ff72b09c778f96fe521be9d816c7d3179edf936ec35cd66fad2485b03482468629baa3290a1475c72147 tests/libtar/data/large-mtime/pax.sqfs
-c40037ae4a4b4224a919cf18c238d5a6b13f17fcca2602810e870e7606435f61426417cda32dd9bca85e74ec6c0fc75c996f60ec8b4560e79c83631937b6cdfa tests/libtar/data/negative-mtime/gnu.sqfs
-c40037ae4a4b4224a919cf18c238d5a6b13f17fcca2602810e870e7606435f61426417cda32dd9bca85e74ec6c0fc75c996f60ec8b4560e79c83631937b6cdfa tests/libtar/data/negative-mtime/pax.sqfs
-d3d112eab3537f6784a207d0bfd8f2826908fbddb3cf20e379a646c6c587c8bbaa67a1753a4ee0246c110dc10bd0ce821fa58368936efac3a1bbf8fd3f782e2b tests/libtar/data/format-acceptance/gnu-g.sqfs
-d3d112eab3537f6784a207d0bfd8f2826908fbddb3cf20e379a646c6c587c8bbaa67a1753a4ee0246c110dc10bd0ce821fa58368936efac3a1bbf8fd3f782e2b tests/libtar/data/format-acceptance/gnu.sqfs
-d3d112eab3537f6784a207d0bfd8f2826908fbddb3cf20e379a646c6c587c8bbaa67a1753a4ee0246c110dc10bd0ce821fa58368936efac3a1bbf8fd3f782e2b tests/libtar/data/format-acceptance/ustar-pre-posix.sqfs
-d3d112eab3537f6784a207d0bfd8f2826908fbddb3cf20e379a646c6c587c8bbaa67a1753a4ee0246c110dc10bd0ce821fa58368936efac3a1bbf8fd3f782e2b tests/libtar/data/format-acceptance/v7.sqfs
-d3d112eab3537f6784a207d0bfd8f2826908fbddb3cf20e379a646c6c587c8bbaa67a1753a4ee0246c110dc10bd0ce821fa58368936efac3a1bbf8fd3f782e2b tests/libtar/data/format-acceptance/pax.sqfs
-d3d112eab3537f6784a207d0bfd8f2826908fbddb3cf20e379a646c6c587c8bbaa67a1753a4ee0246c110dc10bd0ce821fa58368936efac3a1bbf8fd3f782e2b tests/libtar/data/format-acceptance/ustar.sqfs
-20eb111e2019eca4f26535e52823593ebf6a6b2c35d7a8779d6e4f92b90cba8e41edaf1f92425b5084adc680a7c0dac758a2f5170e0b4f19db3ea3357fb3080a tests/libtar/data/format-acceptance/link_filled.sqfs
-a5e95c464f41249da9a4156db3a23d30e01652881e839912f632f2614f1775e62a3fed184efbec1a25148f43edf7ba2a92e1136416aca4bf8f3e73a3b137162b tests/libtar/data/user-group-largenum/gnu.sqfs
-428728b2ca26543a9b0e698d1ae4f54463a7912b51248f2bd34627eb20f3abd8469379a5cd71ab6903aedd198ef48c97e66385c22f128e8aa08571f669c4c6c6 tests/libtar/data/user-group-largenum/8-digit.sqfs
-a5e95c464f41249da9a4156db3a23d30e01652881e839912f632f2614f1775e62a3fed184efbec1a25148f43edf7ba2a92e1136416aca4bf8f3e73a3b137162b tests/libtar/data/user-group-largenum/pax.sqfs
-6ff3ae611d295fc597db088f82ccd0218220ffb51ed901f0d1027c68d687f917b1601bf096421281fb95df48fb2aa6e5f1dc81caccbaa914cb971e17a2c4d5cd tests/libtar/data/xattr/xattr-schily-binary.sqfs
-627a69ed25f9b5380d269fbe12603818d73b29d6a1155fcf7bebca2ba30ec1cce7b8405394498333f9847f10f0768b80b94b723551dbff10c633d2887e62b804 tests/libtar/data/xattr/xattr-schily.sqfs
-627a69ed25f9b5380d269fbe12603818d73b29d6a1155fcf7bebca2ba30ec1cce7b8405394498333f9847f10f0768b80b94b723551dbff10c633d2887e62b804 tests/libtar/data/xattr/xattr-libarchive.sqfs
-b8e0e1cb41663c3d6278bf214234ac00ae8b86b9bc16d086bd0a7bfa9b0d28d626f70c6a1bd6f05dbbfa46431ce3f4518a4be38caf87b1f071d57edae24c5b10 tests/libtar/data/xattr/acl.sqfs
-bae693082a771c500c2d6b52a8eeb91decd98e90eaae379951bcc80589533ff43b58375f8a7f3de77c35456ee7fb269a6b17e4c29b291475578ba8453f152d0e tests/tar2sqfs/root-becomes.sqfs
+6217c207d51e38bd819ff70047a070d0172c2e1cc97ba5feb578a2429d1c911bd7990ea845b28389a956754e52e5693beba38c124bf6d7452522361a81c2da09 test_tar/data/long-paths/gnu.sqfs
+6217c207d51e38bd819ff70047a070d0172c2e1cc97ba5feb578a2429d1c911bd7990ea845b28389a956754e52e5693beba38c124bf6d7452522361a81c2da09 test_tar/data/long-paths/pax.sqfs
+6217c207d51e38bd819ff70047a070d0172c2e1cc97ba5feb578a2429d1c911bd7990ea845b28389a956754e52e5693beba38c124bf6d7452522361a81c2da09 test_tar/data/long-paths/ustar.sqfs
+2e2cd5fa04304c5765d7bb54c30273be6cd7414150ae95d217efcec1fbaa7486b4e752adb95e0dddd5329355132baaa7260dc958eb4418158a249929e89b0581 test_tar/data/sparse-files/gnu-small.sqfs
+f48a79c58db4d3553ffde5bd3780bb34c12fd0ee703aba95a40588c1cf7b5a679ea16d2a842a11e262bd14c2f0b4dd256436dcfc72a177a455427f93b504eae6 test_tar/data/sparse-files/gnu.sqfs
+f48a79c58db4d3553ffde5bd3780bb34c12fd0ee703aba95a40588c1cf7b5a679ea16d2a842a11e262bd14c2f0b4dd256436dcfc72a177a455427f93b504eae6 test_tar/data/sparse-files/pax-gnu0-1.sqfs
+f48a79c58db4d3553ffde5bd3780bb34c12fd0ee703aba95a40588c1cf7b5a679ea16d2a842a11e262bd14c2f0b4dd256436dcfc72a177a455427f93b504eae6 test_tar/data/sparse-files/pax-gnu0-0.sqfs
+f48a79c58db4d3553ffde5bd3780bb34c12fd0ee703aba95a40588c1cf7b5a679ea16d2a842a11e262bd14c2f0b4dd256436dcfc72a177a455427f93b504eae6 test_tar/data/sparse-files/pax-gnu1-0.sqfs
+194384a9a3683ef751f45ca9f380790b3bd9c234a839ff72b09c778f96fe521be9d816c7d3179edf936ec35cd66fad2485b03482468629baa3290a1475c72147 test_tar/data/large-mtime/12-digit.sqfs
+194384a9a3683ef751f45ca9f380790b3bd9c234a839ff72b09c778f96fe521be9d816c7d3179edf936ec35cd66fad2485b03482468629baa3290a1475c72147 test_tar/data/large-mtime/gnu.sqfs
+194384a9a3683ef751f45ca9f380790b3bd9c234a839ff72b09c778f96fe521be9d816c7d3179edf936ec35cd66fad2485b03482468629baa3290a1475c72147 test_tar/data/large-mtime/pax.sqfs
+c40037ae4a4b4224a919cf18c238d5a6b13f17fcca2602810e870e7606435f61426417cda32dd9bca85e74ec6c0fc75c996f60ec8b4560e79c83631937b6cdfa test_tar/data/negative-mtime/gnu.sqfs
+c40037ae4a4b4224a919cf18c238d5a6b13f17fcca2602810e870e7606435f61426417cda32dd9bca85e74ec6c0fc75c996f60ec8b4560e79c83631937b6cdfa test_tar/data/negative-mtime/pax.sqfs
+d3d112eab3537f6784a207d0bfd8f2826908fbddb3cf20e379a646c6c587c8bbaa67a1753a4ee0246c110dc10bd0ce821fa58368936efac3a1bbf8fd3f782e2b test_tar/data/format-acceptance/gnu-g.sqfs
+d3d112eab3537f6784a207d0bfd8f2826908fbddb3cf20e379a646c6c587c8bbaa67a1753a4ee0246c110dc10bd0ce821fa58368936efac3a1bbf8fd3f782e2b test_tar/data/format-acceptance/gnu.sqfs
+d3d112eab3537f6784a207d0bfd8f2826908fbddb3cf20e379a646c6c587c8bbaa67a1753a4ee0246c110dc10bd0ce821fa58368936efac3a1bbf8fd3f782e2b test_tar/data/format-acceptance/ustar-pre-posix.sqfs
+d3d112eab3537f6784a207d0bfd8f2826908fbddb3cf20e379a646c6c587c8bbaa67a1753a4ee0246c110dc10bd0ce821fa58368936efac3a1bbf8fd3f782e2b test_tar/data/format-acceptance/v7.sqfs
+d3d112eab3537f6784a207d0bfd8f2826908fbddb3cf20e379a646c6c587c8bbaa67a1753a4ee0246c110dc10bd0ce821fa58368936efac3a1bbf8fd3f782e2b test_tar/data/format-acceptance/pax.sqfs
+d3d112eab3537f6784a207d0bfd8f2826908fbddb3cf20e379a646c6c587c8bbaa67a1753a4ee0246c110dc10bd0ce821fa58368936efac3a1bbf8fd3f782e2b test_tar/data/format-acceptance/ustar.sqfs
+20eb111e2019eca4f26535e52823593ebf6a6b2c35d7a8779d6e4f92b90cba8e41edaf1f92425b5084adc680a7c0dac758a2f5170e0b4f19db3ea3357fb3080a test_tar/data/format-acceptance/link_filled.sqfs
+a5e95c464f41249da9a4156db3a23d30e01652881e839912f632f2614f1775e62a3fed184efbec1a25148f43edf7ba2a92e1136416aca4bf8f3e73a3b137162b test_tar/data/user-group-largenum/gnu.sqfs
+428728b2ca26543a9b0e698d1ae4f54463a7912b51248f2bd34627eb20f3abd8469379a5cd71ab6903aedd198ef48c97e66385c22f128e8aa08571f669c4c6c6 test_tar/data/user-group-largenum/8-digit.sqfs
+a5e95c464f41249da9a4156db3a23d30e01652881e839912f632f2614f1775e62a3fed184efbec1a25148f43edf7ba2a92e1136416aca4bf8f3e73a3b137162b test_tar/data/user-group-largenum/pax.sqfs
+6ff3ae611d295fc597db088f82ccd0218220ffb51ed901f0d1027c68d687f917b1601bf096421281fb95df48fb2aa6e5f1dc81caccbaa914cb971e17a2c4d5cd test_tar/data/xattr/xattr-schily-binary.sqfs
+627a69ed25f9b5380d269fbe12603818d73b29d6a1155fcf7bebca2ba30ec1cce7b8405394498333f9847f10f0768b80b94b723551dbff10c633d2887e62b804 test_tar/data/xattr/xattr-schily.sqfs
+627a69ed25f9b5380d269fbe12603818d73b29d6a1155fcf7bebca2ba30ec1cce7b8405394498333f9847f10f0768b80b94b723551dbff10c633d2887e62b804 test_tar/data/xattr/xattr-libarchive.sqfs
+b8e0e1cb41663c3d6278bf214234ac00ae8b86b9bc16d086bd0a7bfa9b0d28d626f70c6a1bd6f05dbbfa46431ce3f4518a4be38caf87b1f071d57edae24c5b10 test_tar/data/xattr/acl.sqfs
+bae693082a771c500c2d6b52a8eeb91decd98e90eaae379951bcc80589533ff43b58375f8a7f3de77c35456ee7fb269a6b17e4c29b291475578ba8453f152d0e test_tar/root-becomes.sqfs
diff --git a/tests/tar2sqfs/test_tar_sqfs.sh.in b/bin/tar2sqfs/test/test_tar_sqfs.sh.in
index 750add4..eb25fd9 100755
--- a/tests/tar2sqfs/test_tar_sqfs.sh.in
+++ b/bin/tar2sqfs/test/test_tar_sqfs.sh.in
@@ -2,8 +2,8 @@
set -e
-TARDIR="@abs_top_srcdir@/tests/libtar/data"
-TARDIR2="@abs_top_srcdir@/tests/tar2sqfs"
+TARDIR="@abs_top_srcdir@/lib/tar/test/data"
+TARDIR2="@abs_top_srcdir@/bin/tar2sqfs/test"
SHA512FILE="$TARDIR2/sqfs.sha512"
TAR2SQFS="@abs_top_builddir@/tar2sqfs"
@@ -13,7 +13,7 @@ fi
# process tar files used for conformance tests
for filename in $(find "$TARDIR" -name "*.tar" | grep -v ".*/file-size/.*"); do
- dir="$(dirname $filename | sed -n -e 's;.*/tests/;tests/;p')"
+ dir="$(dirname $filename | sed -n -e 's;.*/test/;test_tar/;p')"
imgname="$dir/$(basename $filename .tar).sqfs"
mkdir -p "$dir"
@@ -22,10 +22,8 @@ done
# edge case test
filename="$TARDIR2/simple.tar"
-dir="$(dirname $filename | sed -n -e 's;.*/tests/;tests/;p')"
-imgname="$dir/root-becomes.sqfs"
+imgname="./test_tar/root-becomes.sqfs"
-mkdir -p "$dir"
"$TAR2SQFS" --root-becomes foo --defaults mtime=0 \
-c gzip -q "$imgname" < "$filename"
@@ -33,12 +31,4 @@ mkdir -p "$dir"
sha512sum -c "$SHA512FILE"
# cleanup
-rm "$dir/root-becomes.sqfs"
-
-for filename in $(find "$TARDIR" -name "*.tar" | grep -v ".*/file-size/.*"); do
- dir="$(dirname $filename | sed -n -e 's;.*/tests/;tests/;p')"
- imgname="$dir/$(basename $filename .tar).sqfs"
-
- rm "$imgname"
- rmdir -p "$dir" || true
-done
+rm -rf "./test_tar"
diff --git a/configure.ac b/configure.ac
index 09f5dfd..312f8ff 100644
--- a/configure.ac
+++ b/configure.ac
@@ -276,10 +276,10 @@ AM_CONDITIONAL([CUSTOM_ALLOC], [test "x$enable_custom_alloc" = "xyes"])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([lib/sqfs/libsquashfs1.pc])
AC_CONFIG_FILES([Doxyfile])
-AC_CONFIG_FILES([tests/tar2sqfs/test_tar_sqfs.sh],
- [chmod +x tests/tar2sqfs/test_tar_sqfs.sh])
-AC_CONFIG_FILES([tests/rdsquashfs/pathtraversal.sh],
- [chmod +x tests/rdsquashfs/pathtraversal.sh])
+AC_CONFIG_FILES([bin/tar2sqfs/test/test_tar_sqfs.sh],
+ [chmod +x bin/tar2sqfs/test/test_tar_sqfs.sh])
+AC_CONFIG_FILES([bin/rdsquashfs/test/pathtraversal.sh],
+ [chmod +x bin/rdsquashfs/test/pathtraversal.sh])
AC_OUTPUT([Makefile])
diff --git a/lib/fstree/Makemodule.am b/lib/fstree/Makemodule.am
index f740527..e2d2ae7 100644
--- a/lib/fstree/Makemodule.am
+++ b/lib/fstree/Makemodule.am
@@ -4,3 +4,39 @@ libfstree_a_SOURCES = include/fstree.h lib/fstree/src/fstree.c \
lib/fstree/src/add_by_path.c lib/fstree/src/get_by_path.c
noinst_LIBRARIES += libfstree.a
+
+test_mknode_simple_SOURCES = lib/fstree/test/mknode_simple.c
+test_mknode_simple_LDADD = libfstree.a libcompat.a
+
+test_mknode_slink_SOURCES = lib/fstree/test/mknode_slink.c
+test_mknode_slink_LDADD = libfstree.a libcompat.a
+
+test_mknode_reg_SOURCES = lib/fstree/test/mknode_reg.c
+test_mknode_reg_LDADD = libfstree.a libcompat.a
+
+test_mknode_dir_SOURCES = lib/fstree/test/mknode_dir.c
+test_mknode_dir_LDADD = libfstree.a libcompat.a
+
+test_gen_inode_numbers_SOURCES = lib/fstree/test/gen_inode_numbers.c
+test_gen_inode_numbers_LDADD = libfstree.a libutil.a libcompat.a
+
+test_add_by_path_SOURCES = lib/fstree/test/add_by_path.c
+test_add_by_path_LDADD = libfstree.a libutil.a libcompat.a
+
+test_get_path_SOURCES = lib/fstree/test/get_path.c
+test_get_path_LDADD = libfstree.a libutil.a libcompat.a
+
+test_fstree_sort_SOURCES = lib/fstree/test/fstree_sort.c
+test_fstree_sort_LDADD = libfstree.a libio.a libutil.a libcompat.a
+
+test_fstree_init_SOURCES = lib/fstree/test/fstree_init.c
+test_fstree_init_LDADD = libfstree.a libio.a libutil.a libcompat.a
+
+FSTREE_TESTS = \
+ 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_init
+
+check_PROGRAMS += $(FSTREE_TESTS)
+TESTS += $(FSTREE_TESTS)
diff --git a/tests/libfstree/add_by_path.c b/lib/fstree/test/add_by_path.c
index 97e5a60..97e5a60 100644
--- a/tests/libfstree/add_by_path.c
+++ b/lib/fstree/test/add_by_path.c
diff --git a/tests/libfstree/fstree_init.c b/lib/fstree/test/fstree_init.c
index 186f25b..186f25b 100644
--- a/tests/libfstree/fstree_init.c
+++ b/lib/fstree/test/fstree_init.c
diff --git a/tests/libfstree/fstree_sort.c b/lib/fstree/test/fstree_sort.c
index 7df85f5..7df85f5 100644
--- a/tests/libfstree/fstree_sort.c
+++ b/lib/fstree/test/fstree_sort.c
diff --git a/tests/libfstree/gen_inode_numbers.c b/lib/fstree/test/gen_inode_numbers.c
index 5403580..5403580 100644
--- a/tests/libfstree/gen_inode_numbers.c
+++ b/lib/fstree/test/gen_inode_numbers.c
diff --git a/tests/libfstree/get_path.c b/lib/fstree/test/get_path.c
index 61001e9..61001e9 100644
--- a/tests/libfstree/get_path.c
+++ b/lib/fstree/test/get_path.c
diff --git a/tests/libfstree/mknode_dir.c b/lib/fstree/test/mknode_dir.c
index dd7eba7..dd7eba7 100644
--- a/tests/libfstree/mknode_dir.c
+++ b/lib/fstree/test/mknode_dir.c
diff --git a/tests/libfstree/mknode_reg.c b/lib/fstree/test/mknode_reg.c
index 368720f..368720f 100644
--- a/tests/libfstree/mknode_reg.c
+++ b/lib/fstree/test/mknode_reg.c
diff --git a/tests/libfstree/mknode_simple.c b/lib/fstree/test/mknode_simple.c
index c7efb49..c7efb49 100644
--- a/tests/libfstree/mknode_simple.c
+++ b/lib/fstree/test/mknode_simple.c
diff --git a/tests/libfstree/mknode_slink.c b/lib/fstree/test/mknode_slink.c
index c50a0ba..c50a0ba 100644
--- a/tests/libfstree/mknode_slink.c
+++ b/lib/fstree/test/mknode_slink.c
diff --git a/lib/io/Makemodule.am b/lib/io/Makemodule.am
index c331124..17952f4 100644
--- a/lib/io/Makemodule.am
+++ b/lib/io/Makemodule.am
@@ -14,3 +14,16 @@ libio_a_SOURCES += lib/io/src/unix/ostream.c lib/io/src/unix/istream.c
endif
noinst_LIBRARIES += libio.a
+
+test_get_line_SOURCES = lib/io/test/get_line.c
+test_get_line_LDADD = libio.a libcompat.a
+test_get_line_CPPFLAGS = $(AM_CPPFLAGS)
+test_get_line_CPPFLAGS += -DTESTFILE=$(top_srcdir)/lib/io/test/get_line.txt
+
+test_sparse_fb_SOURCES = lib/io/test/sparse_fb.c
+test_sparse_fb_LDADD = libio.a libutil.a libcompat.a
+
+check_PROGRAMS += test_get_line test_sparse_fb
+TESTS += test_get_line test_sparse_fb
+
+EXTRA_DIST += $(top_srcdir)/lib/io/test/get_line.txt
diff --git a/tests/libio/get_line.c b/lib/io/test/get_line.c
index 2d0f9b7..2d0f9b7 100644
--- a/tests/libio/get_line.c
+++ b/lib/io/test/get_line.c
diff --git a/tests/libio/get_line.txt b/lib/io/test/get_line.txt
index a1994f0..a1994f0 100644
--- a/tests/libio/get_line.txt
+++ b/lib/io/test/get_line.txt
diff --git a/tests/libio/sparse_fb.c b/lib/io/test/sparse_fb.c
index fa4b840..fa4b840 100644
--- a/tests/libio/sparse_fb.c
+++ b/lib/io/test/sparse_fb.c
diff --git a/lib/sqfs/Makemodule.am b/lib/sqfs/Makemodule.am
index dfd88c9..3500aad 100644
--- a/lib/sqfs/Makemodule.am
+++ b/lib/sqfs/Makemodule.am
@@ -103,3 +103,26 @@ sqfsinclude_HEADERS = $(LIBSQFS_HEARDS)
lib_LTLIBRARIES += libsquashfs.la
pkgconfig_DATA += lib/sqfs/libsquashfs1.pc
+
+test_abi_SOURCES = lib/sqfs/test/abi.c
+test_abi_LDADD = libsquashfs.la libcompat.a
+
+test_table_SOURCES = lib/sqfs/test/table.c
+test_table_LDADD = libsquashfs.la libcompat.a
+
+test_xattr_writer_SOURCES = lib/sqfs/test/xattr_writer.c
+test_xattr_writer_LDADD = libsquashfs.la libcompat.a
+
+xattr_benchmark_SOURCES = lib/sqfs/test/xattr_benchmark.c
+xattr_benchmark_LDADD = libcommon.a libsquashfs.la libcompat.a
+
+test_get_node_path_SOURCES = lib/sqfs/test/get_node_path.c
+test_get_node_path_LDADD = libcommon.a libsquashfs.la libcompat.a
+
+LIBSQFS_TESTS = \
+ test_abi test_table test_xattr_writer test_get_node_path
+
+noinst_PROGRAMS += xattr_benchmark
+
+check_PROGRAMS += $(LIBSQFS_TESTS)
+TESTS += $(LIBSQFS_TESTS)
diff --git a/tests/libsqfs/abi.c b/lib/sqfs/test/abi.c
index 0eaf5df..0eaf5df 100644
--- a/tests/libsqfs/abi.c
+++ b/lib/sqfs/test/abi.c
diff --git a/tests/libsqfs/get_node_path.c b/lib/sqfs/test/get_node_path.c
index c76cc1c..c76cc1c 100644
--- a/tests/libsqfs/get_node_path.c
+++ b/lib/sqfs/test/get_node_path.c
diff --git a/tests/libsqfs/table.c b/lib/sqfs/test/table.c
index 3e44fa3..3e44fa3 100644
--- a/tests/libsqfs/table.c
+++ b/lib/sqfs/test/table.c
diff --git a/tests/libsqfs/xattr_benchmark.c b/lib/sqfs/test/xattr_benchmark.c
index 072dd06..072dd06 100644
--- a/tests/libsqfs/xattr_benchmark.c
+++ b/lib/sqfs/test/xattr_benchmark.c
diff --git a/tests/libsqfs/xattr_writer.c b/lib/sqfs/test/xattr_writer.c
index f7d0734..f7d0734 100644
--- a/tests/libsqfs/xattr_writer.c
+++ b/lib/sqfs/test/xattr_writer.c
diff --git a/lib/tar/Makemodule.am b/lib/tar/Makemodule.am
index 1db02f1..896ce0f 100644
--- a/lib/tar/Makemodule.am
+++ b/lib/tar/Makemodule.am
@@ -6,3 +6,180 @@ libtar_a_SOURCES = lib/tar/src/read_header.c lib/tar/src/write_header.c \
include/tar/tar.h include/tar/format.h
noinst_LIBRARIES += libtar.a
+
+TARDATADIR=$(top_srcdir)/lib/tar/test/data
+
+test_tar_gnu0_SOURCES = lib/tar/test/tar_simple.c
+test_tar_gnu0_LDADD = libtar.a libio.a libutil.a libcompat.a
+test_tar_gnu0_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(TARDATADIR)
+test_tar_gnu0_CPPFLAGS += -DTESTFILE=format-acceptance/gnu.tar
+
+test_tar_gnu1_SOURCES = lib/tar/test/tar_simple.c
+test_tar_gnu1_LDADD = libtar.a libio.a libutil.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 = lib/tar/test/tar_simple.c
+test_tar_gnu2_LDADD = libtar.a libio.a libutil.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 = lib/tar/test/tar_simple.c
+test_tar_gnu3_LDADD = libtar.a libio.a libutil.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 = lib/tar/test/tar_simple.c
+test_tar_gnu4_LDADD = libtar.a libio.a libutil.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 = lib/tar/test/tar_simple.c
+test_tar_gnu5_LDADD = libtar.a libio.a libutil.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 = lib/tar/test/tar_big_file.c
+test_tar_gnu6_LDADD = libtar.a libio.a libutil.a libcompat.a
+test_tar_gnu6_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(TARDATADIR)
+test_tar_gnu6_CPPFLAGS += -DTESTFILE=file-size/gnu.tar
+
+test_tar_pax0_SOURCES = lib/tar/test/tar_simple.c
+test_tar_pax0_LDADD = libtar.a libio.a libutil.a libcompat.a
+test_tar_pax0_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(TARDATADIR)
+test_tar_pax0_CPPFLAGS += -DTESTFILE=format-acceptance/pax.tar
+
+test_tar_pax1_SOURCES = lib/tar/test/tar_simple.c
+test_tar_pax1_LDADD = libtar.a libio.a libutil.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 = lib/tar/test/tar_simple.c
+test_tar_pax2_LDADD = libtar.a libio.a libutil.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 = lib/tar/test/tar_simple.c
+test_tar_pax3_LDADD = libtar.a libio.a libutil.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 = lib/tar/test/tar_simple.c
+test_tar_pax4_LDADD = libtar.a libio.a libutil.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 = lib/tar/test/tar_big_file.c
+test_tar_pax5_LDADD = libtar.a libio.a libutil.a libcompat.a
+test_tar_pax5_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(TARDATADIR)
+test_tar_pax5_CPPFLAGS += -DTESTFILE=file-size/pax.tar
+
+test_tar_ustar0_SOURCES = lib/tar/test/tar_simple.c
+test_tar_ustar0_LDADD = libtar.a libio.a libutil.a libcompat.a
+test_tar_ustar0_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(TARDATADIR)
+test_tar_ustar0_CPPFLAGS += -DTESTFILE=format-acceptance/ustar.tar
+
+test_tar_ustar1_SOURCES = lib/tar/test/tar_simple.c
+test_tar_ustar1_LDADD = libtar.a libio.a libutil.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 = lib/tar/test/tar_simple.c
+test_tar_ustar2_LDADD = libtar.a libio.a libutil.a libcompat.a
+test_tar_ustar2_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(TARDATADIR)
+test_tar_ustar2_CPPFLAGS += -DTESTFILE=format-acceptance/v7.tar
+
+test_tar_ustar3_SOURCES = lib/tar/test/tar_simple.c
+test_tar_ustar3_LDADD = libtar.a libio.a libutil.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 = lib/tar/test/tar_simple.c
+test_tar_ustar4_LDADD = libtar.a libio.a libutil.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 = lib/tar/test/tar_simple.c
+test_tar_ustar5_LDADD = libtar.a libio.a libutil.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 = lib/tar/test/tar_big_file.c
+test_tar_ustar6_LDADD = libtar.a libio.a libutil.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 = lib/tar/test/tar_target_filled.c
+test_tar_target_filled_LDADD = libtar.a libio.a libutil.a libcompat.a
+test_tar_target_filled_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(TARDATADIR)
+
+test_tar_sparse_gnu_SOURCES = lib/tar/test/tar_sparse_gnu.c
+test_tar_sparse_gnu_LDADD = libtar.a libio.a libutil.a libcompat.a
+test_tar_sparse_gnu_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(TARDATADIR)
+
+test_tar_sparse_gnu0_SOURCES = lib/tar/test/tar_sparse.c
+test_tar_sparse_gnu0_LDADD = libtar.a libio.a libutil.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 = lib/tar/test/tar_sparse.c
+test_tar_sparse_gnu1_LDADD = libtar.a libio.a libutil.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 = lib/tar/test/tar_sparse.c
+test_tar_sparse_gnu2_LDADD = libtar.a libio.a libutil.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 = lib/tar/test/tar_sparse.c
+test_tar_sparse_gnu3_LDADD = libtar.a libio.a libutil.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 = lib/tar/test/tar_xattr.c
+test_tar_xattr_bsd_LDADD = libtar.a libio.a libutil.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 = lib/tar/test/tar_xattr.c
+test_tar_xattr_schily_LDADD = libtar.a libio.a libutil.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 = lib/tar/test/tar_xattr_bin.c
+test_tar_xattr_schily_bin_LDADD = libtar.a libio.a libutil.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 = lib/tar/test/tar_fuzz.c
+tar_fuzz_LDADD = libtar.a libio.a libutil.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
+
+check_PROGRAMS += $(LIBTAR_TESTS)
+TESTS += $(LIBTAR_TESTS)
+
+noinst_PROGRAMS += tar_fuzz
+
+EXTRA_DIST += $(TARDATADIR)
diff --git a/tests/libtar/data/CREDITS b/lib/tar/test/data/CREDITS
index 7a2738f..7a2738f 100644
--- a/tests/libtar/data/CREDITS
+++ b/lib/tar/test/data/CREDITS
diff --git a/tests/libtar/data/file-size/12-digit.tar b/lib/tar/test/data/file-size/12-digit.tar
index a6b3553..a6b3553 100644
--- a/tests/libtar/data/file-size/12-digit.tar
+++ b/lib/tar/test/data/file-size/12-digit.tar
Binary files differ
diff --git a/tests/libtar/data/file-size/gnu.tar b/lib/tar/test/data/file-size/gnu.tar
index aad726f..aad726f 100644
--- a/tests/libtar/data/file-size/gnu.tar
+++ b/lib/tar/test/data/file-size/gnu.tar
Binary files differ
diff --git a/tests/libtar/data/file-size/pax.tar b/lib/tar/test/data/file-size/pax.tar
index e391fee..e391fee 100644
--- a/tests/libtar/data/file-size/pax.tar
+++ b/lib/tar/test/data/file-size/pax.tar
Binary files differ
diff --git a/tests/libtar/data/format-acceptance/gnu-g.tar b/lib/tar/test/data/format-acceptance/gnu-g.tar
index a72f60d..a72f60d 100644
--- a/tests/libtar/data/format-acceptance/gnu-g.tar
+++ b/lib/tar/test/data/format-acceptance/gnu-g.tar
Binary files differ
diff --git a/tests/libtar/data/format-acceptance/gnu.tar b/lib/tar/test/data/format-acceptance/gnu.tar
index 98e8157..98e8157 100644
--- a/tests/libtar/data/format-acceptance/gnu.tar
+++ b/lib/tar/test/data/format-acceptance/gnu.tar
Binary files differ
diff --git a/tests/libtar/data/format-acceptance/link_filled.tar b/lib/tar/test/data/format-acceptance/link_filled.tar
index 9b80f89..9b80f89 100644
--- a/tests/libtar/data/format-acceptance/link_filled.tar
+++ b/lib/tar/test/data/format-acceptance/link_filled.tar
Binary files differ
diff --git a/tests/libtar/data/format-acceptance/pax.tar b/lib/tar/test/data/format-acceptance/pax.tar
index 69a029f..69a029f 100644
--- a/tests/libtar/data/format-acceptance/pax.tar
+++ b/lib/tar/test/data/format-acceptance/pax.tar
Binary files differ
diff --git a/tests/libtar/data/format-acceptance/ustar-pre-posix.tar b/lib/tar/test/data/format-acceptance/ustar-pre-posix.tar
index 4230f5f..4230f5f 100644
--- a/tests/libtar/data/format-acceptance/ustar-pre-posix.tar
+++ b/lib/tar/test/data/format-acceptance/ustar-pre-posix.tar
Binary files differ
diff --git a/tests/libtar/data/format-acceptance/ustar.tar b/lib/tar/test/data/format-acceptance/ustar.tar
index 9a6d9b3..9a6d9b3 100644
--- a/tests/libtar/data/format-acceptance/ustar.tar
+++ b/lib/tar/test/data/format-acceptance/ustar.tar
Binary files differ
diff --git a/tests/libtar/data/format-acceptance/v7.tar b/lib/tar/test/data/format-acceptance/v7.tar
index 5483b4b..5483b4b 100644
--- a/tests/libtar/data/format-acceptance/v7.tar
+++ b/lib/tar/test/data/format-acceptance/v7.tar
Binary files differ
diff --git a/tests/libtar/data/large-mtime/12-digit.tar b/lib/tar/test/data/large-mtime/12-digit.tar
index 8202b28..8202b28 100644
--- a/tests/libtar/data/large-mtime/12-digit.tar
+++ b/lib/tar/test/data/large-mtime/12-digit.tar
Binary files differ
diff --git a/tests/libtar/data/large-mtime/gnu.tar b/lib/tar/test/data/large-mtime/gnu.tar
index 4e3dda2..4e3dda2 100644
--- a/tests/libtar/data/large-mtime/gnu.tar
+++ b/lib/tar/test/data/large-mtime/gnu.tar
Binary files differ
diff --git a/tests/libtar/data/large-mtime/pax.tar b/lib/tar/test/data/large-mtime/pax.tar
index 8d32530..8d32530 100644
--- a/tests/libtar/data/large-mtime/pax.tar
+++ b/lib/tar/test/data/large-mtime/pax.tar
Binary files differ
diff --git a/tests/libtar/data/long-paths/gnu.tar b/lib/tar/test/data/long-paths/gnu.tar
index 4eee731..4eee731 100644
--- a/tests/libtar/data/long-paths/gnu.tar
+++ b/lib/tar/test/data/long-paths/gnu.tar
Binary files differ
diff --git a/tests/libtar/data/long-paths/pax.tar b/lib/tar/test/data/long-paths/pax.tar
index 1e63e9c..1e63e9c 100644
--- a/tests/libtar/data/long-paths/pax.tar
+++ b/lib/tar/test/data/long-paths/pax.tar
Binary files differ
diff --git a/tests/libtar/data/long-paths/ustar.tar b/lib/tar/test/data/long-paths/ustar.tar
index 812255c..812255c 100644
--- a/tests/libtar/data/long-paths/ustar.tar
+++ b/lib/tar/test/data/long-paths/ustar.tar
Binary files differ
diff --git a/tests/libtar/data/negative-mtime/gnu.tar b/lib/tar/test/data/negative-mtime/gnu.tar
index a9b1272..a9b1272 100644
--- a/tests/libtar/data/negative-mtime/gnu.tar
+++ b/lib/tar/test/data/negative-mtime/gnu.tar
Binary files differ
diff --git a/tests/libtar/data/negative-mtime/pax.tar b/lib/tar/test/data/negative-mtime/pax.tar
index d0b3e6c..d0b3e6c 100644
--- a/tests/libtar/data/negative-mtime/pax.tar
+++ b/lib/tar/test/data/negative-mtime/pax.tar
Binary files differ
diff --git a/tests/libtar/data/sparse-files/gnu-small.tar b/lib/tar/test/data/sparse-files/gnu-small.tar
index 7a1b222..7a1b222 100644
--- a/tests/libtar/data/sparse-files/gnu-small.tar
+++ b/lib/tar/test/data/sparse-files/gnu-small.tar
Binary files differ
diff --git a/tests/libtar/data/sparse-files/gnu.tar b/lib/tar/test/data/sparse-files/gnu.tar
index 3d641a2..3d641a2 100644
--- a/tests/libtar/data/sparse-files/gnu.tar
+++ b/lib/tar/test/data/sparse-files/gnu.tar
Binary files differ
diff --git a/tests/libtar/data/sparse-files/pax-gnu0-0.tar b/lib/tar/test/data/sparse-files/pax-gnu0-0.tar
index 628f09e..628f09e 100644
--- a/tests/libtar/data/sparse-files/pax-gnu0-0.tar
+++ b/lib/tar/test/data/sparse-files/pax-gnu0-0.tar
Binary files differ
diff --git a/tests/libtar/data/sparse-files/pax-gnu0-1.tar b/lib/tar/test/data/sparse-files/pax-gnu0-1.tar
index 87e362e..87e362e 100644
--- a/tests/libtar/data/sparse-files/pax-gnu0-1.tar
+++ b/lib/tar/test/data/sparse-files/pax-gnu0-1.tar
Binary files differ
diff --git a/tests/libtar/data/sparse-files/pax-gnu1-0.tar b/lib/tar/test/data/sparse-files/pax-gnu1-0.tar
index edb0ccf..edb0ccf 100644
--- a/tests/libtar/data/sparse-files/pax-gnu1-0.tar
+++ b/lib/tar/test/data/sparse-files/pax-gnu1-0.tar
Binary files differ
diff --git a/tests/libtar/data/user-group-largenum/8-digit.tar b/lib/tar/test/data/user-group-largenum/8-digit.tar
index a48ea5d..a48ea5d 100644
--- a/tests/libtar/data/user-group-largenum/8-digit.tar
+++ b/lib/tar/test/data/user-group-largenum/8-digit.tar
Binary files differ
diff --git a/tests/libtar/data/user-group-largenum/gnu.tar b/lib/tar/test/data/user-group-largenum/gnu.tar
index 4c30f57..4c30f57 100644
--- a/tests/libtar/data/user-group-largenum/gnu.tar
+++ b/lib/tar/test/data/user-group-largenum/gnu.tar
Binary files differ
diff --git a/tests/libtar/data/user-group-largenum/pax.tar b/lib/tar/test/data/user-group-largenum/pax.tar
index a9fe54c..a9fe54c 100644
--- a/tests/libtar/data/user-group-largenum/pax.tar
+++ b/lib/tar/test/data/user-group-largenum/pax.tar
Binary files differ
diff --git a/tests/libtar/data/xattr/acl.tar b/lib/tar/test/data/xattr/acl.tar
index a65c0af..a65c0af 100644
--- a/tests/libtar/data/xattr/acl.tar
+++ b/lib/tar/test/data/xattr/acl.tar
Binary files differ
diff --git a/tests/libtar/data/xattr/xattr-libarchive.tar b/lib/tar/test/data/xattr/xattr-libarchive.tar
index 3bd6125..3bd6125 100644
--- a/tests/libtar/data/xattr/xattr-libarchive.tar
+++ b/lib/tar/test/data/xattr/xattr-libarchive.tar
Binary files differ
diff --git a/tests/libtar/data/xattr/xattr-schily-binary.tar b/lib/tar/test/data/xattr/xattr-schily-binary.tar
index 0312807..0312807 100644
--- a/tests/libtar/data/xattr/xattr-schily-binary.tar
+++ b/lib/tar/test/data/xattr/xattr-schily-binary.tar
Binary files differ
diff --git a/tests/libtar/data/xattr/xattr-schily.tar b/lib/tar/test/data/xattr/xattr-schily.tar
index 1cf525c..1cf525c 100644
--- a/tests/libtar/data/xattr/xattr-schily.tar
+++ b/lib/tar/test/data/xattr/xattr-schily.tar
Binary files differ
diff --git a/tests/libtar/tar_big_file.c b/lib/tar/test/tar_big_file.c
index deb41f4..deb41f4 100644
--- a/tests/libtar/tar_big_file.c
+++ b/lib/tar/test/tar_big_file.c
diff --git a/tests/libtar/tar_fuzz.c b/lib/tar/test/tar_fuzz.c
index 21e6978..21e6978 100644
--- a/tests/libtar/tar_fuzz.c
+++ b/lib/tar/test/tar_fuzz.c
diff --git a/tests/libtar/tar_simple.c b/lib/tar/test/tar_simple.c
index cb38abb..cb38abb 100644
--- a/tests/libtar/tar_simple.c
+++ b/lib/tar/test/tar_simple.c
diff --git a/tests/libtar/tar_sparse.c b/lib/tar/test/tar_sparse.c
index 27ce053..27ce053 100644
--- a/tests/libtar/tar_sparse.c
+++ b/lib/tar/test/tar_sparse.c
diff --git a/tests/libtar/tar_sparse_gnu.c b/lib/tar/test/tar_sparse_gnu.c
index 19ddd0a..19ddd0a 100644
--- a/tests/libtar/tar_sparse_gnu.c
+++ b/lib/tar/test/tar_sparse_gnu.c
diff --git a/tests/libtar/tar_target_filled.c b/lib/tar/test/tar_target_filled.c
index abc6a47..abc6a47 100644
--- a/tests/libtar/tar_target_filled.c
+++ b/lib/tar/test/tar_target_filled.c
diff --git a/tests/libtar/tar_xattr.c b/lib/tar/test/tar_xattr.c
index 122d1db..122d1db 100644
--- a/tests/libtar/tar_xattr.c
+++ b/lib/tar/test/tar_xattr.c
diff --git a/tests/libtar/tar_xattr_bin.c b/lib/tar/test/tar_xattr_bin.c
index 90443a1..90443a1 100644
--- a/tests/libtar/tar_xattr_bin.c
+++ b/lib/tar/test/tar_xattr_bin.c
diff --git a/lib/util/Makemodule.am b/lib/util/Makemodule.am
index 35e8078..0a0e50e 100644
--- a/lib/util/Makemodule.am
+++ b/lib/util/Makemodule.am
@@ -32,3 +32,55 @@ libutil_a_SOURCES += lib/util/src/mempool.c
endif
noinst_LIBRARIES += libutil.a
+
+test_str_table_SOURCES = lib/util/test/str_table.c
+test_str_table_LDADD = libutil.a libio.a libcompat.a
+test_str_table_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/lib/util/test
+
+test_rbtree_SOURCES = lib/util/test/rbtree.c
+test_rbtree_LDADD = libutil.a libcompat.a
+
+test_xxhash_SOURCES = lib/util/test/xxhash.c
+test_xxhash_LDADD = libutil.a libcompat.a
+
+test_threadpool_SOURCES = lib/util/test/threadpool.c
+test_threadpool_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS)
+test_threadpool_CPPFLAGS = $(AM_CPPFLAGS)
+test_threadpool_LDADD = libutil.a libcompat.a $(PTHREAD_LIBS)
+
+if HAVE_PTHREAD
+test_threadpool_CPPFLAGS += -DHAVE_PTHREAD
+endif
+
+test_ismemzero_SOURCES = lib/util/test/is_memory_zero.c
+test_ismemzero_LDADD = libutil.a libcompat.a
+
+test_canonicalize_name_SOURCES = lib/util/test/canonicalize_name.c
+test_canonicalize_name_LDADD = libutil.a libcompat.a
+
+test_filename_sane_SOURCES = lib/util/test/filename_sane.c
+test_filename_sane_SOURCES += lib/util/src/filename_sane.c
+test_filename_sane_LDADD = libcompat.a libutil.a
+
+test_filename_sane_w32_SOURCES = lib/util/test/filename_sane.c
+test_filename_sane_w32_SOURCES += lib/util/src/filename_sane.c
+test_filename_sane_w32_CPPFLAGS = $(AM_CPPFLAGS) -DTEST_WIN32=1
+test_filename_sane_w32_LDADD = libcompat.a
+
+test_sdate_epoch_SOURCES = lib/util/test/epoch.c
+test_sdate_epoch_LDADD = libutil.a libcompat.a
+
+test_hex_decode_SOURCES = lib/util/test/hex_decode.c
+test_hex_decode_LDADD = libutil.a libcompat.a
+
+test_base64_decode_SOURCES = lib/util/test/base64_decode.c
+test_base64_decode_LDADD = libutil.a libcompat.a
+
+LIBUTIL_TESTS = \
+ test_str_table test_rbtree test_xxhash test_threadpool test_ismemzero \
+ test_canonicalize_name test_filename_sane test_filename_sane_w32 \
+ test_sdate_epoch test_hex_decode test_base64_decode
+
+check_PROGRAMS += $(LIBUTIL_TESTS)
+TESTS += $(LIBUTIL_TESTS)
+EXTRA_DIST += $(top_srcdir)/lib/util/test/words.txt
diff --git a/tests/libutil/base64_decode.c b/lib/util/test/base64_decode.c
index 8f22a86..8f22a86 100644
--- a/tests/libutil/base64_decode.c
+++ b/lib/util/test/base64_decode.c
diff --git a/tests/libutil/canonicalize_name.c b/lib/util/test/canonicalize_name.c
index 9f81b04..9f81b04 100644
--- a/tests/libutil/canonicalize_name.c
+++ b/lib/util/test/canonicalize_name.c
diff --git a/tests/libutil/epoch.c b/lib/util/test/epoch.c
index a04942e..a04942e 100644
--- a/tests/libutil/epoch.c
+++ b/lib/util/test/epoch.c
diff --git a/tests/libutil/filename_sane.c b/lib/util/test/filename_sane.c
index 9c9930d..9c9930d 100644
--- a/tests/libutil/filename_sane.c
+++ b/lib/util/test/filename_sane.c
diff --git a/tests/libutil/hex_decode.c b/lib/util/test/hex_decode.c
index 21ac4e7..21ac4e7 100644
--- a/tests/libutil/hex_decode.c
+++ b/lib/util/test/hex_decode.c
diff --git a/tests/libutil/is_memory_zero.c b/lib/util/test/is_memory_zero.c
index f62b0bb..f62b0bb 100644
--- a/tests/libutil/is_memory_zero.c
+++ b/lib/util/test/is_memory_zero.c
diff --git a/tests/libutil/rbtree.c b/lib/util/test/rbtree.c
index ca01c0d..ca01c0d 100644
--- a/tests/libutil/rbtree.c
+++ b/lib/util/test/rbtree.c
diff --git a/tests/libutil/str_table.c b/lib/util/test/str_table.c
index d4160eb..d4160eb 100644
--- a/tests/libutil/str_table.c
+++ b/lib/util/test/str_table.c
diff --git a/tests/libutil/threadpool.c b/lib/util/test/threadpool.c
index cf54484..cf54484 100644
--- a/tests/libutil/threadpool.c
+++ b/lib/util/test/threadpool.c
diff --git a/tests/libutil/words.txt b/lib/util/test/words.txt
index 9496e14..9496e14 100644
--- a/tests/libutil/words.txt
+++ b/lib/util/test/words.txt
diff --git a/tests/libutil/xxhash.c b/lib/util/test/xxhash.c
index 17374fd..17374fd 100644
--- a/tests/libutil/xxhash.c
+++ b/lib/util/test/xxhash.c
diff --git a/lib/xfrm/Makemodule.am b/lib/xfrm/Makemodule.am
index ad446f6..a517df7 100644
--- a/lib/xfrm/Makemodule.am
+++ b/lib/xfrm/Makemodule.am
@@ -1,3 +1,6 @@
+LIBXFRM_LIBS = $(ZLIB_LIBS) $(XZ_LIBS) $(BZIP2_LIBS) $(ZSTD_LIBS)
+LIBXFRM_TESTS =
+
libxfrm_a_SOURCES = include/xfrm/stream.h include/xfrm/compress.h \
lib/xfrm/src/compress.c
libxfrm_a_CFLAGS = $(AM_CFLAGS)
@@ -5,23 +8,66 @@ libxfrm_a_CFLAGS = $(AM_CFLAGS)
if WITH_XZ
libxfrm_a_SOURCES += lib/xfrm/src/xz.c
libxfrm_a_CFLAGS += $(XZ_CFLAGS) -DWITH_XZ
+
+test_unpack_xz_SOURCES = lib/xfrm/test/unpack.c
+test_unpack_xz_LDADD = libxfrm.a $(XZ_LIBS)
+test_unpack_xz_CPPFLAGS = $(AM_CPPFLAGS) -DDO_XZ=1
+
+test_pack_xz_SOURCES = lib/xfrm/test/pack.c
+test_pack_xz_LDADD = libxfrm.a $(LIBXFRM_LIBS)
+test_pack_xz_CPPFLAGS = $(AM_CPPFLAGS) -DDO_XZ=1
+
+LIBXFRM_TESTS += test_pack_xz test_unpack_xz
endif
if WITH_BZIP2
libxfrm_a_SOURCES += lib/xfrm/src/bzip2.c
libxfrm_a_CFLAGS += $(BZIP2_CFLAGS) -DWITH_BZIP2
+
+test_unpack_bzip2_SOURCES = lib/xfrm/test/unpack.c
+test_unpack_bzip2_LDADD = libxfrm.a $(BZIP2_LIBS)
+test_unpack_bzip2_CPPFLAGS = $(AM_CPPFLAGS) -DDO_BZIP2=1
+
+test_pack_bzip2_SOURCES = lib/xfrm/test/pack.c
+test_pack_bzip2_LDADD = libxfrm.a $(LIBXFRM_LIBS)
+test_pack_bzip2_CPPFLAGS = $(AM_CPPFLAGS) -DDO_BZIP2=1
+
+LIBXFRM_TESTS += test_unpack_bzip2 test_pack_bzip2
endif
if WITH_GZIP
libxfrm_a_SOURCES += lib/xfrm/src/gzip.c
libxfrm_a_CFLAGS += $(ZLIB_CFLAGS) -DWITH_GZIP
+
+test_unpack_gzip_SOURCES = lib/xfrm/test/unpack.c
+test_unpack_gzip_LDADD = libxfrm.a $(ZLIB_LIBS)
+test_unpack_gzip_CPPFLAGS = $(AM_CPPFLAGS) -DDO_GZIP=1
+
+test_pack_gzip_SOURCES = lib/xfrm/test/pack.c
+test_pack_gzip_LDADD = libxfrm.a $(LIBXFRM_LIBS)
+test_pack_gzip_CPPFLAGS = $(AM_CPPFLAGS) -DDO_GZIP=1
+
+LIBXFRM_TESTS += test_pack_gzip test_unpack_gzip
endif
if WITH_ZSTD
if HAVE_ZSTD_STREAM
libxfrm_a_SOURCES += lib/xfrm/src/zstd.c
libxfrm_a_CFLAGS += $(ZSTD_CFLAGS) -DWITH_ZSTD
+
+test_pack_zstd_SOURCES = lib/xfrm/test/unpack.c
+test_pack_zstd_LDADD = libxfrm.a $(ZSTD_LIBS)
+test_pack_zstd_CPPFLAGS = $(AM_CPPFLAGS) -DDO_ZSTD=1
+
+test_unpack_zstd_SOURCES = lib/xfrm/test/pack.c
+test_unpack_zstd_LDADD = libxfrm.a $(LIBXFRM_LIBS)
+test_unpack_zstd_CPPFLAGS = $(AM_CPPFLAGS) -DDO_ZSTD=1
+
+LIBXFRM_TESTS += test_pack_zstd test_unpack_zstd
endif
endif
noinst_LIBRARIES += libxfrm.a
+
+check_PROGRAMS += $(LIBXFRM_TESTS)
+TESTS += $(LIBXFRM_TESTS)
diff --git a/tests/libxfrm/pack.c b/lib/xfrm/test/pack.c
index c297005..c297005 100644
--- a/tests/libxfrm/pack.c
+++ b/lib/xfrm/test/pack.c
diff --git a/tests/libxfrm/unpack.c b/lib/xfrm/test/unpack.c
index ca51f10..ca51f10 100644
--- a/tests/libxfrm/unpack.c
+++ b/lib/xfrm/test/unpack.c
diff --git a/tests/gensquashfs/Makemodule.am b/tests/gensquashfs/Makemodule.am
deleted file mode 100644
index 9dd9d76..0000000
--- a/tests/gensquashfs/Makemodule.am
+++ /dev/null
@@ -1,63 +0,0 @@
-GENDATADIR=$(top_srcdir)/tests/gensquashfs
-
-test_filemap_xattr_SOURCES = tests/gensquashfs/filemap_xattr.c \
- bin/gensquashfs/src/filemap_xattr.c \
- bin/gensquashfs/src/mkfs.h
-test_filemap_xattr_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/bin/gensquashfs/src
-test_filemap_xattr_CPPFLAGS += -DTESTPATH=$(GENDATADIR)/xattr1.txt
-test_filemap_xattr_LDADD = libsquashfs.la libfstree.a libutil.a
-test_filemap_xattr_LDADD += libio.a libcompat.a
-
-test_fstree_from_file_SOURCES = tests/gensquashfs/fstree_from_file.c \
- bin/gensquashfs/src/fstree_from_file.c \
- bin/gensquashfs/src/fstree_from_dir.c \
- bin/gensquashfs/src/mkfs.h
-test_fstree_from_file_CPPFLAGS = $(AM_CPPFLAGS)
-test_fstree_from_file_CPPFLAGS += -I$(top_srcdir)/bin/gensquashfs/src
-test_fstree_from_file_CPPFLAGS += -DTESTPATH=$(GENDATADIR)/fstree1.txt
-test_fstree_from_file_LDADD = libfstree.a libio.a libutil.a libcompat.a
-
-test_fstree_glob1_SOURCES = tests/gensquashfs/fstree_glob1.c \
- bin/gensquashfs/src/fstree_from_file.c \
- bin/gensquashfs/src/fstree_from_dir.c \
- bin/gensquashfs/src/mkfs.h
-test_fstree_glob1_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/bin/gensquashfs/src
-test_fstree_glob1_CPPFLAGS += -DTESTPATH=$(GENDATADIR)
-test_fstree_glob1_LDADD = libfstree.a libio.a libutil.a libcompat.a
-
-test_fstree_from_dir_SOURCES = tests/gensquashfs/fstree_from_dir.c \
- bin/gensquashfs/src/fstree_from_dir.c \
- bin/gensquashfs/src/mkfs.h
-test_fstree_from_dir_CPPFLAGS = $(AM_CPPFLAGS)
-test_fstree_from_dir_CPPFLAGS += -I$(top_srcdir)/bin/gensquashfs/src
-test_fstree_from_dir_CPPFLAGS += -DTESTPATH=$(GENDATADIR)/testdir
-test_fstree_from_dir_LDADD = libfstree.a libutil.a libcompat.a
-
-test_sort_file_SOURCES = tests/gensquashfs/sort_file.c \
- bin/gensquashfs/src/fstree_from_file.c \
- bin/gensquashfs/src/fstree_from_dir.c \
- bin/gensquashfs/src/sort_by_file.c \
- bin/gensquashfs/src/mkfs.h
-test_sort_file_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/bin/gensquashfs/src
-test_sort_file_LDADD = libfstree.a libio.a libutil.a libcompat.a
-
-fstree_fuzz_SOURCES = tests/gensquashfs/fstree_fuzz.c \
- bin/gensquashfs/src/fstree_from_file.c \
- bin/gensquashfs/src/fstree_from_dir.c \
- bin/gensquashfs/src/mkfs.h
-fstree_fuzz_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/bin/gensquashfs/src
-fstree_fuzz_LDADD = libfstree.a libio.a libutil.a libcompat.a
-
-GENSQUASHFS_TESTS = \
- test_filemap_xattr test_fstree_from_file test_fstree_from_dir \
- test_fstree_glob1 test_sort_file
-
-noinst_PROGRAMS += fstree_fuzz
-
-check_PROGRAMS += $(GENSQUASHFS_TESTS)
-TESTS += $(GENSQUASHFS_TESTS)
-
-EXTRA_DIST += $(GENDATADIR)/xattr1.txt $(GENDATADIR)/fstree1.txt
-EXTRA_DIST += $(GENDATADIR)/fstree_glob1.txt $(GENDATADIR)/fstree_glob2.txt
-EXTRA_DIST += $(GENDATADIR)/fstree_glob3.txt
-EXTRA_DIST += $(GENDATADIR)/testdir
diff --git a/tests/gensquashfs/fstree_glob1.txt b/tests/gensquashfs/fstree_glob1.txt
deleted file mode 100644
index b1df979..0000000
--- a/tests/gensquashfs/fstree_glob1.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-dir /tarcorpus 0755 0 0
-glob /tarcorpus 0755 0 0 -type d -- ../libtar/data
diff --git a/tests/gensquashfs/fstree_glob2.txt b/tests/gensquashfs/fstree_glob2.txt
deleted file mode 100644
index 3c8019b..0000000
--- a/tests/gensquashfs/fstree_glob2.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-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/gensquashfs/fstree_glob3.txt b/tests/gensquashfs/fstree_glob3.txt
deleted file mode 100644
index 35090e4..0000000
--- a/tests/gensquashfs/fstree_glob3.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-glob / 0755 0 0 -type d ../libtar/data
-glob / 0644 0 0 -type f -name "*gnu*.tar" -- ../libtar/data
diff --git a/tests/libfstree/Makemodule.am b/tests/libfstree/Makemodule.am
deleted file mode 100644
index 14e1b38..0000000
--- a/tests/libfstree/Makemodule.am
+++ /dev/null
@@ -1,38 +0,0 @@
-FSTDATADIR=$(top_srcdir)/tests/libfstree
-
-test_mknode_simple_SOURCES = tests/libfstree/mknode_simple.c
-test_mknode_simple_LDADD = libfstree.a libcompat.a
-
-test_mknode_slink_SOURCES = tests/libfstree/mknode_slink.c
-test_mknode_slink_LDADD = libfstree.a libcompat.a
-
-test_mknode_reg_SOURCES = tests/libfstree/mknode_reg.c
-test_mknode_reg_LDADD = libfstree.a libcompat.a
-
-test_mknode_dir_SOURCES = tests/libfstree/mknode_dir.c
-test_mknode_dir_LDADD = libfstree.a libcompat.a
-
-test_gen_inode_numbers_SOURCES = tests/libfstree/gen_inode_numbers.c
-test_gen_inode_numbers_LDADD = libfstree.a libutil.a libcompat.a
-
-test_add_by_path_SOURCES = tests/libfstree/add_by_path.c
-test_add_by_path_LDADD = libfstree.a libutil.a libcompat.a
-
-test_get_path_SOURCES = tests/libfstree/get_path.c
-test_get_path_LDADD = libfstree.a libutil.a libcompat.a
-
-test_fstree_sort_SOURCES = tests/libfstree/fstree_sort.c
-test_fstree_sort_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/lib/fstree
-test_fstree_sort_LDADD = libfstree.a libio.a libutil.a libcompat.a
-
-test_fstree_init_SOURCES = tests/libfstree/fstree_init.c
-test_fstree_init_LDADD = libfstree.a libio.a libutil.a libcompat.a
-
-FSTREE_TESTS = \
- 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_init
-
-check_PROGRAMS += $(FSTREE_TESTS)
-TESTS += $(FSTREE_TESTS)
diff --git a/tests/libio/Makemodule.am b/tests/libio/Makemodule.am
deleted file mode 100644
index e031973..0000000
--- a/tests/libio/Makemodule.am
+++ /dev/null
@@ -1,12 +0,0 @@
-test_get_line_SOURCES = tests/libio/get_line.c
-test_get_line_LDADD = libio.a libcompat.a
-test_get_line_CPPFLAGS = $(AM_CPPFLAGS)
-test_get_line_CPPFLAGS += -DTESTFILE=$(top_srcdir)/tests/libio/get_line.txt
-
-test_sparse_fb_SOURCES = tests/libio/sparse_fb.c
-test_sparse_fb_LDADD = libio.a libutil.a libcompat.a
-
-check_PROGRAMS += test_get_line test_sparse_fb
-TESTS += test_get_line test_sparse_fb
-
-EXTRA_DIST += $(top_srcdir)/tests/libio/get_line.txt
diff --git a/tests/libsqfs/Makemodule.am b/tests/libsqfs/Makemodule.am
deleted file mode 100644
index 0c91be4..0000000
--- a/tests/libsqfs/Makemodule.am
+++ /dev/null
@@ -1,22 +0,0 @@
-test_abi_SOURCES = tests/libsqfs/abi.c
-test_abi_LDADD = libsquashfs.la libcompat.a
-
-test_table_SOURCES = tests/libsqfs/table.c
-test_table_LDADD = libsquashfs.la libcompat.a
-
-test_xattr_writer_SOURCES = tests/libsqfs/xattr_writer.c
-test_xattr_writer_LDADD = libsquashfs.la libcompat.a
-
-xattr_benchmark_SOURCES = tests/libsqfs/xattr_benchmark.c
-xattr_benchmark_LDADD = libcommon.a libsquashfs.la libcompat.a
-
-test_get_node_path_SOURCES = tests/libsqfs/get_node_path.c
-test_get_node_path_LDADD = libcommon.a libsquashfs.la libcompat.a
-
-LIBSQFS_TESTS = \
- test_abi test_table test_xattr_writer test_get_node_path
-
-noinst_PROGRAMS += xattr_benchmark
-
-check_PROGRAMS += $(LIBSQFS_TESTS)
-TESTS += $(LIBSQFS_TESTS)
diff --git a/tests/libtar/Makemodule.am b/tests/libtar/Makemodule.am
deleted file mode 100644
index 07c19cc..0000000
--- a/tests/libtar/Makemodule.am
+++ /dev/null
@@ -1,176 +0,0 @@
-TARDATADIR=$(top_srcdir)/tests/libtar/data
-
-test_tar_gnu0_SOURCES = tests/libtar/tar_simple.c
-test_tar_gnu0_LDADD = libtar.a libio.a libutil.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
-test_tar_gnu1_LDADD = libtar.a libio.a libutil.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
-test_tar_gnu2_LDADD = libtar.a libio.a libutil.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
-test_tar_gnu3_LDADD = libtar.a libio.a libutil.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
-test_tar_gnu4_LDADD = libtar.a libio.a libutil.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
-test_tar_gnu5_LDADD = libtar.a libio.a libutil.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
-test_tar_gnu6_LDADD = libtar.a libio.a libutil.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
-test_tar_pax0_LDADD = libtar.a libio.a libutil.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
-test_tar_pax1_LDADD = libtar.a libio.a libutil.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
-test_tar_pax2_LDADD = libtar.a libio.a libutil.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
-test_tar_pax3_LDADD = libtar.a libio.a libutil.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
-test_tar_pax4_LDADD = libtar.a libio.a libutil.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
-test_tar_pax5_LDADD = libtar.a libio.a libutil.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
-test_tar_ustar0_LDADD = libtar.a libio.a libutil.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
-test_tar_ustar1_LDADD = libtar.a libio.a libutil.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
-test_tar_ustar2_LDADD = libtar.a libio.a libutil.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
-test_tar_ustar3_LDADD = libtar.a libio.a libutil.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
-test_tar_ustar4_LDADD = libtar.a libio.a libutil.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
-test_tar_ustar5_LDADD = libtar.a libio.a libutil.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
-test_tar_ustar6_LDADD = libtar.a libio.a libutil.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
-test_tar_target_filled_LDADD = libtar.a libio.a libutil.a libcompat.a
-test_tar_target_filled_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(TARDATADIR)
-
-test_tar_sparse_gnu_SOURCES = tests/libtar/tar_sparse_gnu.c
-test_tar_sparse_gnu_LDADD = libtar.a libio.a libutil.a libcompat.a
-test_tar_sparse_gnu_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(TARDATADIR)
-
-test_tar_sparse_gnu0_SOURCES = tests/libtar/tar_sparse.c
-test_tar_sparse_gnu0_LDADD = libtar.a libio.a libutil.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
-test_tar_sparse_gnu1_LDADD = libtar.a libio.a libutil.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
-test_tar_sparse_gnu2_LDADD = libtar.a libio.a libutil.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
-test_tar_sparse_gnu3_LDADD = libtar.a libio.a libutil.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
-test_tar_xattr_bsd_LDADD = libtar.a libio.a libutil.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
-test_tar_xattr_schily_LDADD = libtar.a libio.a libutil.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
-test_tar_xattr_schily_bin_LDADD = libtar.a libio.a libutil.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 libio.a libutil.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
-
-check_PROGRAMS += $(LIBTAR_TESTS)
-TESTS += $(LIBTAR_TESTS)
-
-noinst_PROGRAMS += tar_fuzz
-
-EXTRA_DIST += $(TARDATADIR)
diff --git a/tests/libutil/Makemodule.am b/tests/libutil/Makemodule.am
deleted file mode 100644
index 4cec465..0000000
--- a/tests/libutil/Makemodule.am
+++ /dev/null
@@ -1,51 +0,0 @@
-test_str_table_SOURCES = tests/libutil/str_table.c
-test_str_table_LDADD = libutil.a libio.a libcompat.a
-test_str_table_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/libutil
-
-test_rbtree_SOURCES = tests/libutil/rbtree.c
-test_rbtree_LDADD = libutil.a libcompat.a
-
-test_xxhash_SOURCES = tests/libutil/xxhash.c
-test_xxhash_LDADD = libutil.a libcompat.a
-
-test_threadpool_SOURCES = tests/libutil/threadpool.c
-test_threadpool_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS)
-test_threadpool_CPPFLAGS = $(AM_CPPFLAGS)
-test_threadpool_LDADD = libutil.a libcompat.a $(PTHREAD_LIBS)
-
-if HAVE_PTHREAD
-test_threadpool_CPPFLAGS += -DHAVE_PTHREAD
-endif
-
-test_ismemzero_SOURCES = tests/libutil/is_memory_zero.c
-test_ismemzero_LDADD = libutil.a libcompat.a
-
-test_canonicalize_name_SOURCES = tests/libutil/canonicalize_name.c
-test_canonicalize_name_LDADD = libutil.a libcompat.a
-
-test_filename_sane_SOURCES = tests/libutil/filename_sane.c
-test_filename_sane_SOURCES += lib/util/src/filename_sane.c
-test_filename_sane_LDADD = libcompat.a libutil.a
-
-test_filename_sane_w32_SOURCES = tests/libutil/filename_sane.c
-test_filename_sane_w32_SOURCES += lib/util/src/filename_sane.c
-test_filename_sane_w32_CPPFLAGS = $(AM_CPPFLAGS) -DTEST_WIN32=1
-test_filename_sane_w32_LDADD = libcompat.a
-
-test_sdate_epoch_SOURCES = tests/libutil/epoch.c
-test_sdate_epoch_LDADD = libutil.a libcompat.a
-
-test_hex_decode_SOURCES = tests/libutil/hex_decode.c
-test_hex_decode_LDADD = libutil.a libcompat.a
-
-test_base64_decode_SOURCES = tests/libutil/base64_decode.c
-test_base64_decode_LDADD = libutil.a libcompat.a
-
-LIBUTIL_TESTS = \
- test_str_table test_rbtree test_xxhash test_threadpool test_ismemzero \
- test_canonicalize_name test_filename_sane test_filename_sane_w32 \
- test_sdate_epoch test_hex_decode test_base64_decode
-
-check_PROGRAMS += $(LIBUTIL_TESTS)
-TESTS += $(LIBUTIL_TESTS)
-EXTRA_DIST += $(top_srcdir)/tests/libutil/words.txt
diff --git a/tests/libxfrm/Makemodule.am b/tests/libxfrm/Makemodule.am
deleted file mode 100644
index 706406c..0000000
--- a/tests/libxfrm/Makemodule.am
+++ /dev/null
@@ -1,55 +0,0 @@
-LIBXFRM_LIBS = $(ZLIB_LIBS) $(XZ_LIBS) $(BZIP2_LIBS) $(ZSTD_LIBS)
-LIBXFRM_TESTS =
-
-if WITH_GZIP
-test_unpack_gzip_SOURCES = tests/libxfrm/unpack.c
-test_unpack_gzip_LDADD = libxfrm.a $(ZLIB_LIBS)
-test_unpack_gzip_CPPFLAGS = $(AM_CPPFLAGS) -DDO_GZIP=1
-
-test_pack_gzip_SOURCES = tests/libxfrm/pack.c
-test_pack_gzip_LDADD = libxfrm.a $(LIBXFRM_LIBS)
-test_pack_gzip_CPPFLAGS = $(AM_CPPFLAGS) -DDO_GZIP=1
-
-LIBXFRM_TESTS += test_pack_gzip test_unpack_gzip
-endif
-
-if WITH_XZ
-test_unpack_xz_SOURCES = tests/libxfrm/unpack.c
-test_unpack_xz_LDADD = libxfrm.a $(XZ_LIBS)
-test_unpack_xz_CPPFLAGS = $(AM_CPPFLAGS) -DDO_XZ=1
-
-test_pack_xz_SOURCES = tests/libxfrm/pack.c
-test_pack_xz_LDADD = libxfrm.a $(LIBXFRM_LIBS)
-test_pack_xz_CPPFLAGS = $(AM_CPPFLAGS) -DDO_XZ=1
-
-LIBXFRM_TESTS += test_pack_xz test_unpack_xz
-endif
-
-if WITH_BZIP2
-test_unpack_bzip2_SOURCES = tests/libxfrm/unpack.c
-test_unpack_bzip2_LDADD = libxfrm.a $(BZIP2_LIBS)
-test_unpack_bzip2_CPPFLAGS = $(AM_CPPFLAGS) -DDO_BZIP2=1
-
-test_pack_bzip2_SOURCES = tests/libxfrm/pack.c
-test_pack_bzip2_LDADD = libxfrm.a $(LIBXFRM_LIBS)
-test_pack_bzip2_CPPFLAGS = $(AM_CPPFLAGS) -DDO_BZIP2=1
-
-LIBXFRM_TESTS += test_unpack_bzip2 test_pack_bzip2
-endif
-
-if WITH_ZSTD
-if HAVE_ZSTD_STREAM
-test_pack_zstd_SOURCES = tests/libxfrm/unpack.c
-test_pack_zstd_LDADD = libxfrm.a $(ZSTD_LIBS)
-test_pack_zstd_CPPFLAGS = $(AM_CPPFLAGS) -DDO_ZSTD=1
-
-test_unpack_zstd_SOURCES = tests/libxfrm/pack.c
-test_unpack_zstd_LDADD = libxfrm.a $(LIBXFRM_LIBS)
-test_unpack_zstd_CPPFLAGS = $(AM_CPPFLAGS) -DDO_ZSTD=1
-
-LIBXFRM_TESTS += test_pack_zstd test_unpack_zstd
-endif
-endif
-
-check_PROGRAMS += $(LIBXFRM_TESTS)
-TESTS += $(LIBXFRM_TESTS)
diff --git a/tests/rdsquashfs/Makemodule.am b/tests/rdsquashfs/Makemodule.am
deleted file mode 100644
index 615b891..0000000
--- a/tests/rdsquashfs/Makemodule.am
+++ /dev/null
@@ -1,7 +0,0 @@
-if WINDOWS
-else
-check_SCRIPTS += tests/rdsquashfs/pathtraversal.sh
-TESTS += tests/rdsquashfs/pathtraversal.sh
-endif
-
-EXTRA_DIST += $(top_srcdir)/tests/rdsquashfs/pathtraversal.sqfs
diff --git a/tests/tar2sqfs/Makemodule.am b/tests/tar2sqfs/Makemodule.am
deleted file mode 100644
index 031416a..0000000
--- a/tests/tar2sqfs/Makemodule.am
+++ /dev/null
@@ -1,5 +0,0 @@
-check_SCRIPTS += tests/tar2sqfs/test_tar_sqfs.sh
-TESTS += tests/tar2sqfs/test_tar_sqfs.sh
-
-EXTRA_DIST += $(top_srcdir)/tests/tar2sqfs/simple.tar
-EXTRA_DIST += $(top_srcdir)/tests/tar2sqfs/sqfs.sha512