aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Makemodule.am27
-rwxr-xr-xtests/cantrbry.sh.in52
-rw-r--r--tests/corpus/cantrbry.sha51272
-rw-r--r--tests/corpus/cantrbry.tar.xzbin486044 -> 0 bytes
-rw-r--r--tests/gensquashfs/fstree_from_dir.c6
-rwxr-xr-xtests/pack_dir_root.sh.in23
-rw-r--r--tests/pack_dir_root.txt.ref10
-rw-r--r--tests/rdsquashfs/Makemodule.am7
-rw-r--r--tests/tar2sqfs/Makemodule.am7
-rw-r--r--tests/tar2sqfs/sqfs.sha512 (renamed from tests/libtar/data/sqfs.sha512)0
-rwxr-xr-xtests/tar2sqfs/test_tar_sqfs.sh.in (renamed from tests/test_tar_sqfs.sh.in)2
-rw-r--r--tests/tarcompress.sh.in71
12 files changed, 15 insertions, 262 deletions
diff --git a/tests/Makemodule.am b/tests/Makemodule.am
deleted file mode 100644
index 7f9f54e..0000000
--- a/tests/Makemodule.am
+++ /dev/null
@@ -1,27 +0,0 @@
-include tests/libutil/Makemodule.am
-include tests/libio/Makemodule.am
-include tests/libfstree/Makemodule.am
-include tests/libtar/Makemodule.am
-include tests/libsqfs/Makemodule.am
-include tests/gensquashfs/Makemodule.am
-
-if BUILD_TOOLS
-if CORPORA_TESTS
-check_SCRIPTS += tests/cantrbry.sh tests/test_tar_sqfs.sh \
- tests/pack_dir_root.sh tests/tarcompress.sh
-TESTS += tests/cantrbry.sh tests/test_tar_sqfs.sh \
- tests/pack_dir_root.sh tests/tarcompress.sh
-endif
-endif
-
-if WINDOWS
-else
-check_SCRIPTS += tests/rdsquashfs/pathtraversal.sh
-TESTS += tests/rdsquashfs/pathtraversal.sh
-endif
-
-EXTRA_DIST += $(top_srcdir)/tests/tar2sqfs
-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/rdsquashfs/pathtraversal.sqfs
diff --git a/tests/cantrbry.sh.in b/tests/cantrbry.sh.in
deleted file mode 100755
index 1ef84e6..0000000
--- a/tests/cantrbry.sh.in
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/bin/sh
-
-set -e
-
-CORPUS="@abs_top_srcdir@/tests/corpus/cantrbry.tar.xz"
-SHA512FILE="@abs_top_srcdir@/tests/corpus/cantrbry.sha512"
-TAR2SQFS="@abs_top_builddir@/tar2sqfs"
-
-if [ ! -f "$TAR2SQFS" -a -f "${TAR2SQFS}.exe" ]; then
- TAR2SQFS="${TAR2SQFS}.exe"
-fi
-
-COMPRESSORS=$("$TAR2SQFS" --help | grep $'\t' | sed 's/ (default)//' | \
- tr -d '\011' | sort | uniq | sed '/uncompressed/d' | \
- sed '/bzip2/d' | sed '/zstd/d' | sed '/lz4/d')
-
-for size in 4k 8k 16k 32k 64k 128k 256k 512k 1M; do
- for cmp in $COMPRESSORS; do
- for threads in 1 2 3 4; do
- name="cantrbry_${cmp}_${size}_${threads}.sqfs"
-
- xzcat "$CORPUS" | \
- "$TAR2SQFS" -q -c "$cmp" -b "$size" \
- -j "$threads" --defaults mtime=0 \
- "$name"
-
- name="cantrbry_${cmp}_${size}_${threads}_T.sqfs"
-
- xzcat "$CORPUS" | \
- "$TAR2SQFS" -qT -c "$cmp" -b "$size" \
- -j "$threads" --defaults mtime=0 \
- "$name"
- done
-
- # check that the ones with > 1 thread are identical,
- # then remove them.
- for threads in 2 3 4; do
- name="cantrbry_${cmp}_${size}_${threads}.sqfs"
- ref="cantrbry_${cmp}_${size}_1.sqfs"
- diff "$name" "$ref"
- rm "$name"
-
- name="cantrbry_${cmp}_${size}_${threads}_T.sqfs"
- ref="cantrbry_${cmp}_${size}_1_T.sqfs"
- diff "$name" "$ref"
- rm "$name"
- done
- done
-done
-
-sha512sum --ignore-missing -c "$SHA512FILE"
-rm cantrbry_*.sqfs
diff --git a/tests/corpus/cantrbry.sha512 b/tests/corpus/cantrbry.sha512
deleted file mode 100644
index e8e9b4e..0000000
--- a/tests/corpus/cantrbry.sha512
+++ /dev/null
@@ -1,72 +0,0 @@
-50a018b7920d499e1a83663532fb83a5059b26223acacc2b36d7e1ba27bd153cf72717267b6133e091d60ac7513cab9b2639a05927b94f9bf904971d6cf64cc7 cantrbry_gzip_128k_1.sqfs
-658989cb453dea4de8cf0789054142fa2c6c3efcc2ed22799f53144c700149c1fbef2731c28a2ca36e668bd91cdbadd8483dbcc11d2a731565c161773aa250fa cantrbry_gzip_128k_1_T.sqfs
-58f8d23addf8cc7316ac0ce656d562b4ec89b574a25fcaa610997162f0a00029b828f1c951f4fb08a3c06d6a44ffa9b6aba0a713a4f6e693f550ec8ca2a2cd9a cantrbry_gzip_16k_1.sqfs
-a11f41113d581b1aa34c67fb2c8409a8c2bd1c9b754031466a87029f10eee57f60b941b3d857b27d503ae8ff7e0037dfc5ef1d4e1f121dccfd7c31debe06a23e cantrbry_gzip_16k_1_T.sqfs
-b13038007946560dde60a48be2f701e46f311e568c69b02d46de013ebc39fed83954989d7de409669f7aa3a5d26cad9114b97264887524b86597a621aab3aec5 cantrbry_gzip_1M_1.sqfs
-b13038007946560dde60a48be2f701e46f311e568c69b02d46de013ebc39fed83954989d7de409669f7aa3a5d26cad9114b97264887524b86597a621aab3aec5 cantrbry_gzip_1M_1_T.sqfs
-591aa4da9fedbe793a681ac788606ba7f985d06a2162f15c710c65edbb3cf80664e7980f263ce377688b7980fcf560bbefa65ade80d2beab395ce477576d3524 cantrbry_gzip_256k_1.sqfs
-31fa65bce121dd64364e05b011a1b62a2ee631513895f132a43952a17a3b48c24a8ee0f735fdc040e76a07962b55ac559b3821a399ad7dd183e0c4ef46fb7f45 cantrbry_gzip_256k_1_T.sqfs
-522a26d6399366a7174414865e1f051211ab239dabe2221e85bf68250d20e2e6504a47c1b146f34c9fbc60e35aacd5d08feafb5386bfba7e326a8321d7cef660 cantrbry_gzip_32k_1.sqfs
-77bcae784b8ec7c4aa80249667f774ffa738966eebd58050a4869236fff3f370f00e0aec9d82c56c64f6952a3937760e3533eef70cbab24aac78bdc884aa1a5c cantrbry_gzip_32k_1_T.sqfs
-502e8335e346247fd501761eae36508973c9f8959528e5dd85f9e86308f0e3dac1a841d8c144950476547c2ee113e05fe5e6ed81a08c09a08b8e1aa4ab6a8e61 cantrbry_gzip_4k_1.sqfs
-06988721106c2420a834a4a06e4fe85e396855ce6ad1c315795de3519a49a176cbdf52c21c5b1a4de1430fc0d1514d6a2535056578b3e137d90b9516a0fd7ff5 cantrbry_gzip_4k_1_T.sqfs
-1fd67afbc46b3032a471cbc0e779b1c4596076ade53993d1278cf1034144ff1ce927efd1f640594027aee9bf76d936d79aff4d92871428b95085049380459360 cantrbry_gzip_512k_1.sqfs
-a7851b1f400ac6b13d5a9e8efc6d250dc7509761823e0cf8697521e49d24e7e076eb4471326a4599d9e83bb469f250d68a45ebd87a2fde8c79813f8363c4c6a8 cantrbry_gzip_512k_1_T.sqfs
-90aeed342683735a68f7ad5af61d4cd2b5ac9ce55304a884147639a4a5297aaa51890e7cf0167e4dd67d516f776bf7ffc7bdff4c12c2d53c74b39eddb2feef9a cantrbry_gzip_64k_1.sqfs
-07ee8f6f5b68feebab503098a91d22d0676ccb84b7a52b9d28c277295504a32f198122fa2da577abc11cd5fe13b02fcba7a12d46f1dffa7f2c6c106f1b2b491b cantrbry_gzip_64k_1_T.sqfs
-9263ce6c9ea458b7c379e14281138ee27fb0362ee85e9cc90b84e49a96b28cb567d64a702ad0e4263248882a9d0378b458d04da65fd9c5cd58fd591e1e07c794 cantrbry_gzip_8k_1.sqfs
-d76e3410f9c8d52639e173c25e3eb28e53d7c1705e800294a609377b5429a379b881073966a01fdcb3094cbfb47c564bd9e88f52942faa56921fb7ede72a08e2 cantrbry_gzip_8k_1_T.sqfs
-83f2892d9edc100d800641cf87ff5e6ff26cde19b66ea4d9e3eaf0717662013e3039f1ba161fb27b2ff8084d1be89f115da5f907c7a10d6caa40caa1e54c2250 cantrbry_lzma_128k_1.sqfs
-a2e2c8283d76da6b15bab48f08aa927ddf266aa90f5ed47845f83638e7d65f5bb4703dcaafbc07d69bf60f061c8b688454ef97ce20554cf65352570c674e9761 cantrbry_lzma_128k_1_T.sqfs
-8c9f8ed0ef69a4342dab5e336550228c655eef4d85486af4c5bfd5609400b28bdabde5d0def00351a3a2e71b42a1d10e37ea07a0cc8e5ab0bdbf3c00b7360320 cantrbry_lzma_16k_1.sqfs
-2dfa86a8e9cf353e9c1f903d8cc1bfb3b44a93d4ed93978eceffdd4e038c935dcb63a9a556013b1b88792c3796241e9ade2ac040a8e0b1db70cda5d6c27a88c8 cantrbry_lzma_16k_1_T.sqfs
-760254668be762d9a04a38fd4ca55d1479861c8cbcfa6543e0b0aceb19869930e6c60804409d591438eb698bbbaf359c8c0d8ffd30771d613dcdb5af075c5c80 cantrbry_lzma_1M_1.sqfs
-760254668be762d9a04a38fd4ca55d1479861c8cbcfa6543e0b0aceb19869930e6c60804409d591438eb698bbbaf359c8c0d8ffd30771d613dcdb5af075c5c80 cantrbry_lzma_1M_1_T.sqfs
-a0aa30bfe7df9fe0f22161e4f2fe4ed17913e28431c1a790dc640598dab21538d6d70f6d690b06b785987bf7664b6183036ea3b8f418f21e4db73c639df53aa8 cantrbry_lzma_256k_1.sqfs
-bc8d02fa87a5bc5990f3615975066abfdcff4882ab343d062440c160c6b20f64f3cdaceffeace839960a7d5486b0552c83029a178188285555aed1c5244f5962 cantrbry_lzma_256k_1_T.sqfs
-a86d70974b7c989412868ca7bcc466f1e6b31de7ff802998dd2811bbaca2611c13a4136183a6b0e70006a13a0e932429ade7d7a1c6a8a5fc85f99070b0906795 cantrbry_lzma_32k_1.sqfs
-8bb85b028bdddbbf90f93023d48f59fa0957887d2aea15d191c06783a12ae8489dd4a9d56e9ba76a9a04d1286aaa9b50e39cd9b773f97d5656b4f17c87fc3b20 cantrbry_lzma_32k_1_T.sqfs
-6651ac83d9c3430a84d345fe13337114e344fabee986adc5948601734aff53728799a348341b5a52764c439bd70ce6487ed6f4e39d9f8a5d0c50b1130078d890 cantrbry_lzma_4k_1.sqfs
-0462b85e5e34600d51e03cd71eba8c16d4a7fea420169ad8547cd050508cf647117b9d6e2cc7604cf2cc797236b5387ce6185607c0c0532da5d4867f0eb894d9 cantrbry_lzma_4k_1_T.sqfs
-5dc0f1aa8b3e7cd8179d545aaff7d13b8bbe6c5586e0127f4a53db3bdd8a5e41bbed3e7eb9fbf45d7ef4844be769e5c807cd8a7e8b3faca7b0fb47a7048dfb01 cantrbry_lzma_512k_1.sqfs
-fff2240a977d77c8b30fe351fdcc4bcd88ad794fc07120326ceef814670e516ef436a0fa61d9168abadaf2d941f51ed5dca66b21408270198322d950282a7998 cantrbry_lzma_512k_1_T.sqfs
-415a769478dd048d8fc49999be2618704cd8fb6c57d02459b1f2541fd1dfd74068ae2a6c5cbbb3830da2e3d96537666efed9282afa5aac30464e8ab3d6cec8c8 cantrbry_lzma_64k_1.sqfs
-2ad876bfd67a749228b4a844846625a981e47e2fe6a0675f74a25eae7f9e972a99e69456b801fdc3f1969a69277c7c1234ea701d70725fb381e86248f60e8480 cantrbry_lzma_64k_1_T.sqfs
-86b21f121ce4b121efb3de79ae4af86d03a55dcf858ae2dab9277c2549f2da0488517c7d90ea27d78c0d3bade10ace40955200b4d486d7947d746c09e8994b84 cantrbry_lzma_8k_1.sqfs
-496c13f2ed9d697667cee7b1b45c7b79f6b6c95de5bb5519931203d3af346c2cbe28a4f2bff9c444c980fff4f01904273af60d2640be5309c57894c5b282e8cf cantrbry_lzma_8k_1_T.sqfs
-1720c41df079bbe7f5f818f4d9fac4194f806184291de071d793cf79a0ff22eb5cfbab737d6cce728a580354d526e08ff029d4ac6edae2461e0efbc105c22869 cantrbry_lzo_128k_1.sqfs
-cc0e1da5fd0e163204db4dd8f6c8525597510e9045b6bf76ff6ce7df64e457e7647bbe43f8fae0e573f41296535ca57b7d4918d77734fe47fed661e5546f345b cantrbry_lzo_128k_1_T.sqfs
-964efbc1b1dfaa2f141beaf9bac78599373d6a60e9ff8346fe93f0a79fb3df471de139a3b015242e98ad585d89e4b87f013bed3f86bb25874461dddbe25516c4 cantrbry_lzo_16k_1.sqfs
-8b6822be1f3bd0e2b902e1335546fe00059b8ab6722925ba040c8bd00028088679e251a9dd89b29a053d4964f65f0cc7811742db44505899a37f7fc12122bcbe cantrbry_lzo_16k_1_T.sqfs
-4039057786b94852a05f7a0a1acf69d762a64d24b26dde54d48fdac48b150c869f8db9c83fa32690af4685de80e65307cb9ea0418df20193abeaa0862c31c368 cantrbry_lzo_1M_1.sqfs
-4039057786b94852a05f7a0a1acf69d762a64d24b26dde54d48fdac48b150c869f8db9c83fa32690af4685de80e65307cb9ea0418df20193abeaa0862c31c368 cantrbry_lzo_1M_1_T.sqfs
-a9f1ababf079816f2cd327a8f13c67139d5e7d5f4109c7dd9a70e6492ec0e2422244c8a6dd3078aed465197c234e148ba9946445212c259a6707ff0fe05c0a3a cantrbry_lzo_256k_1.sqfs
-a72d49068578f2bfffca1be7a7232f1287cf62a5f06e93044c2bfb1354d0df6581c1fb87e51c76d1144f2eea5fdb05a1574a6602089c26a09c9a5e61b8a852a9 cantrbry_lzo_256k_1_T.sqfs
-05251b1eb204351a21841dd1b09945600f7ed590c8f859952c10c153f42d24f62ae8fe899fe5f914d1fb061b3e2dce1eebcddc0a6469e784313aedf8f2e45132 cantrbry_lzo_32k_1.sqfs
-cac10385f612427668c9d4810032717eab80e5fd6ad13afc1cb2536d992e1800f5c6b1121a0d5f1cea92cbea394dee5de6a1dc80bd8fe6d2e66966675674cf55 cantrbry_lzo_32k_1_T.sqfs
-2fad88c25bbcd5a229a946ea81f028241c209cd836c2ea6cf3fef33d96a6ee836c4efce28f7a487d2ff1a458fc37e0acb68cfca28a20168c738ccda3f6426d6f cantrbry_lzo_4k_1.sqfs
-1be653b9b5eedf41459412071c77e31edb432d4bbc31bcf8ea60aadabe9f8ad615885c5af69bb6c85a4bd7f1c3a42ee6317f1eccd8bfcfd53d6407e414ff9f7a cantrbry_lzo_4k_1_T.sqfs
-534dddb50bb45a318b5ca34d9385b13ee3053d6585a0844f6ef48f0fa53789cda16d56f4f9c70067ffe5a2c53923d12458b0aced85cd2477bb27a261823f5f9b cantrbry_lzo_512k_1.sqfs
-dfc273d802cd2127ce54c09a4342b2ef4d883b0616b95d882fbfdbefc22d2411ebcaec2a76809d0ee308b8a7624fa0ad867d98efbc8611f7576725674b20f764 cantrbry_lzo_512k_1_T.sqfs
-bab610ffbe99486457799bf3ead48b4496ade3af2f981f57f7d6ccde7a6fa5ec6ce435acfe924c7232405cf3fb670926411dfd63d1476867ec8e66ac38492c02 cantrbry_lzo_64k_1.sqfs
-e110dce5add52d391502f2b378c4cfd022ab2cee0b6e0c5416a8e8900c484ff43c47651a7dff689914984ee86d38043b027d797c82c7f63ad14ba25484e5a777 cantrbry_lzo_64k_1_T.sqfs
-5237b499fab40c78d614c9bebf3d06bd80b9220d26948a5174619d42d5e64d0fb00fd6bf626a8a3ebf545097b3f6e2b7b71f909122bc065ab8f59666bba6b52f cantrbry_lzo_8k_1.sqfs
-b02963c4926b10a2966b0bad76d17058d996ad950cfa09dbf98b66c304952da4c6e99ff38d28f3869a4d8fe3d5a04c51f3dad2cd879f8b4fb5bfbbb62582bdcf cantrbry_lzo_8k_1_T.sqfs
-9ae1f6923b7992c80876822e5b52a705c9f6b0ff7ffbc93fe8625bc5a46b92900e1b3cb822144f746c29e173e6c7d074de3fc6153ef53bb62745099af9a7973f cantrbry_xz_128k_1.sqfs
-29da607ddadf0564cf65e27079d0a2291d7f32cc9ad44db9e5e52d86802dda83fba6fed60a0dc1b618aa8025629ef075eb7b7b5da0606914437ba1d3e6bb687e cantrbry_xz_128k_1_T.sqfs
-6d1aacb5740cd26f3febc52ebdb8698dcbc39bf897a3a9ef0e8c49d125b1cfd05188e2daed66813d0dc309e4cdea3bc7a6a82ddff7e4d294d9f2121b67a5220b cantrbry_xz_16k_1.sqfs
-98c40886419e0d27d1e93a848f83a9cdd5f8dfa37610259613839e93fa775f7ee232ff2ef2d43df8cde4b5c30a0366b6e0d838551f6e2442a900719802c7d3ce cantrbry_xz_16k_1_T.sqfs
-233d86abe20c45e12c6266271eabb2762c4f3343d0724ac1f462da13c19d791dde6d210a4fdfa381acb1ecf1574f3eaefbc792e653a0aeaf7595d94db4ea9523 cantrbry_xz_1M_1.sqfs
-233d86abe20c45e12c6266271eabb2762c4f3343d0724ac1f462da13c19d791dde6d210a4fdfa381acb1ecf1574f3eaefbc792e653a0aeaf7595d94db4ea9523 cantrbry_xz_1M_1_T.sqfs
-f57fcb76f28fc24ea8d718aea299a9477764acac00a7c904b1439d3b3a7197c536faf7915768e37824051f5cda4720ac62e1766ff78e173646cc001e0cfa5b1d cantrbry_xz_256k_1.sqfs
-c8c4a6e1e33ae2fd251ce1fdaad8e6d6bba9549852140b0c960db166086ddc489173eb3bb56e95ebb65196b30c7d03f61cb47b63bc1edce1af106208f2e35e55 cantrbry_xz_256k_1_T.sqfs
-313f79650996199fda290de76383e5c149e782e374d712a7046056e506dd487c95c5001cd8c3a37a386f8932e6657159e43c0480ee6d9dc669e198b498c73d91 cantrbry_xz_32k_1.sqfs
-7eaa174d3e47899b55377072001bd29a55a14a099eb789c5bdb8b8bbb58be72d5d16e6701a0019b4faf0aca157cff4d578839385e89c73b11718e0c9b27de9cf cantrbry_xz_32k_1_T.sqfs
-aa6357d486e87814dda4a34a2dcf322500ddc9cc2c718e50c9bf0249c513bf189a241609dee3b5389b0a0942c17dc2da70d6c00b09555ad5c2edab3a81e554cd cantrbry_xz_4k_1.sqfs
-2008226606b42860ec2c840fb978a85843fd38ddf015da29973aa6822c4296fa841e5abb739daf25ebbacc3c58281fc05b4903367b277557a9ae89e4c6d4daf2 cantrbry_xz_4k_1_T.sqfs
-ed5091314cb7f56994034bf5d1d3c030286f1823127447a960533b0e78e742e218e3512d5bc2ef33c43d17412af65df9cb734206fe4041648f91d56305bc148d cantrbry_xz_512k_1.sqfs
-54576ab50c01b7919f805dd3199a8d30b65381bc2719b82312daf1345137438f9c7d2b9dc609313517cd4a5f510ef487cfea9a8a57f1d1b72501277aedad5bd2 cantrbry_xz_512k_1_T.sqfs
-a3dc5c3d0927a9100b5d47eac775997824d1b327f3eeee0719c5913c54c4d3fb06e919712352f12118a57fc70fb83e94e76c55e0380a97bafbd9dddd73d51e7f cantrbry_xz_64k_1.sqfs
-f3ccb7cdafb6a7ff6cb737158f4f133424c4d9c4bfda940053b9682d967216fcc168042b5be288223a5ee53f0024c4b23293aee38b17b74429ae7aa097c0f263 cantrbry_xz_64k_1_T.sqfs
-5f6a71d723fcbd8ae69c7af2c3597d2fb5d75d1ba7a676dd0913cdcfcd612d0215c34c0fa6ef43102430faba945bc3c3138c59ebe064d5a4ad9d83cec41fc1a8 cantrbry_xz_8k_1.sqfs
-51797ecf598b15eb9561bb029a9bf0e395edcd8376d4113229f9a13cee87b7ce851a2e156d05076ff1ff8ae72f775d710c70ddc1b4e98abb6ee78fa48414bc18 cantrbry_xz_8k_1_T.sqfs
diff --git a/tests/corpus/cantrbry.tar.xz b/tests/corpus/cantrbry.tar.xz
deleted file mode 100644
index 32be882..0000000
--- a/tests/corpus/cantrbry.tar.xz
+++ /dev/null
Binary files differ
diff --git a/tests/gensquashfs/fstree_from_dir.c b/tests/gensquashfs/fstree_from_dir.c
index 2799bf3..3aad1c6 100644
--- a/tests/gensquashfs/fstree_from_dir.c
+++ b/tests/gensquashfs/fstree_from_dir.c
@@ -237,12 +237,6 @@ static void check_hierarchy(tree_node_t *root, bool recursive)
n = n->next;
TEST_NOT_NULL(n);
- TEST_STR_EQUAL(n->name, "sqfs.sha512");
- TEST_ASSERT(S_ISREG(n->mode));
- TEST_ASSERT(n->parent == root);
-
- n = n->next;
- TEST_NOT_NULL(n);
TEST_STR_EQUAL(n->name, "user-group-largenum");
TEST_ASSERT(S_ISDIR(n->mode));
TEST_ASSERT(n->parent == root);
diff --git a/tests/pack_dir_root.sh.in b/tests/pack_dir_root.sh.in
deleted file mode 100755
index ad0a085..0000000
--- a/tests/pack_dir_root.sh.in
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-set -e
-
-LICDIR="@abs_top_srcdir@/licenses"
-REFFILE="@abs_top_srcdir@/tests/pack_dir_root.txt.ref"
-GENSQFS="@abs_top_builddir@/gensquashfs"
-RDSQFS="@abs_top_builddir@/rdsquashfs"
-IMAGE="pack_dir_root.sqfs"
-SED="@SED@"
-
-if [ ! -f "$GENSQFS" -a -f "${GENSQFS}.exe" ]; then
- GENSQFS="${GENSQFS}.exe"
- RDSQFS="${RDSQFS}.exe"
-fi
-
-"$GENSQFS" --all-root --pack-dir "$LICDIR" --defaults mtime=0 \
- -c gzip -q "$IMAGE"
-
-"$RDSQFS" -l / "$IMAGE" | "$SED" 's/^-[rwx-]* //g' > "${IMAGE}.txt"
-
-diff "$REFFILE" "${IMAGE}.txt"
-rm "$IMAGE" "${IMAGE}.txt"
diff --git a/tests/pack_dir_root.txt.ref b/tests/pack_dir_root.txt.ref
deleted file mode 100644
index 1a64b2a..0000000
--- a/tests/pack_dir_root.txt.ref
+++ /dev/null
@@ -1,10 +0,0 @@
-0/0 607 0BSD.txt
-0/0 18k GPLv2.txt
-0/0 34k GPLv3.txt
-0/0 7k LGPLv3.txt
-0/0 1k LZ4.txt
-0/0 1k hash_table.txt
-0/0 6k musl.txt
-0/0 1k xxhash.txt
-0/0 768 xz.txt
-0/0 1k zstd.txt
diff --git a/tests/rdsquashfs/Makemodule.am b/tests/rdsquashfs/Makemodule.am
new file mode 100644
index 0000000..615b891
--- /dev/null
+++ b/tests/rdsquashfs/Makemodule.am
@@ -0,0 +1,7 @@
+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
new file mode 100644
index 0000000..738c607
--- /dev/null
+++ b/tests/tar2sqfs/Makemodule.am
@@ -0,0 +1,7 @@
+if BUILD_TOOLS
+check_SCRIPTS += tests/tar2sqfs/test_tar_sqfs.sh
+TESTS += tests/tar2sqfs/test_tar_sqfs.sh
+endif
+
+EXTRA_DIST += $(top_srcdir)/tests/tar2sqfs/simple.tar
+EXTRA_DIST += $(top_srcdir)/tests/tar2sqfs/sqfs.sha512
diff --git a/tests/libtar/data/sqfs.sha512 b/tests/tar2sqfs/sqfs.sha512
index a653090..a653090 100644
--- a/tests/libtar/data/sqfs.sha512
+++ b/tests/tar2sqfs/sqfs.sha512
diff --git a/tests/test_tar_sqfs.sh.in b/tests/tar2sqfs/test_tar_sqfs.sh.in
index ad9fba3..750add4 100755
--- a/tests/test_tar_sqfs.sh.in
+++ b/tests/tar2sqfs/test_tar_sqfs.sh.in
@@ -4,7 +4,7 @@ set -e
TARDIR="@abs_top_srcdir@/tests/libtar/data"
TARDIR2="@abs_top_srcdir@/tests/tar2sqfs"
-SHA512FILE="@abs_top_srcdir@/tests/libtar/data/sqfs.sha512"
+SHA512FILE="$TARDIR2/sqfs.sha512"
TAR2SQFS="@abs_top_builddir@/tar2sqfs"
if [ ! -f "$TAR2SQFS" -a -f "${TAR2SQFS}.exe" ]; then
diff --git a/tests/tarcompress.sh.in b/tests/tarcompress.sh.in
deleted file mode 100644
index 726f4e8..0000000
--- a/tests/tarcompress.sh.in
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/bin/bash
-
-set -e
-
-TAR2SQFS="@abs_top_builddir@/tar2sqfs"
-RDSQFS="@abs_top_builddir@/rdsquashfs"
-
-URL="https://mirrors.edge.kernel.org/pub/linux/kernel/v3.x/"
-DIR="/dev/shm/tarcompress/"
-
-mkdir -p "$DIR"
-curl "$URL/linux-3.11.tar.bz2" > "$DIR/linux-3.11.tar.bz2"
-curl "$URL/linux-3.11.tar.gz" > "$DIR/linux-3.11.tar.gz"
-curl "$URL/linux-3.11.tar.xz" > "$DIR/linux-3.11.tar.xz"
-
-sha256sum -c <<_EOF
-e7ae11d20aafdc5a2dfd104f198d87e5ce65fa8ada1ce18a263e89ff0148e1fa $DIR/linux-3.11.tar.bz2
-59904beb1fdae62eb1991f29926c234283c9e4009b6e437499f13d2749bed6ca $DIR/linux-3.11.tar.gz
-803ec8f0ad4b2ddedcb0332a590cd2b5e10dfc57c3b1c95bc9c46af81d51d7f9 $DIR/linux-3.11.tar.xz
-_EOF
-
-"$TAR2SQFS" "$DIR/out1.sqfs" < "$DIR/linux-3.11.tar.bz2"
-"$TAR2SQFS" "$DIR/out2.sqfs" < "$DIR/linux-3.11.tar.gz"
-"$TAR2SQFS" "$DIR/out3.sqfs" < "$DIR/linux-3.11.tar.xz"
-
-# set -e makes sure this explodes if they aren't equal
-diff "$DIR/out1.sqfs" "$DIR/out2.sqfs"
-diff "$DIR/out2.sqfs" "$DIR/out3.sqfs"
-
-rm "$DIR/out2.sqfs" "$DIR/out3.sqfs"
-rm "$DIR/linux-3.11.tar.bz2"
-rm "$DIR/linux-3.11.tar.gz"
-
-# unpack tarball and squashfs image
-tar -C "$DIR" -xf "$DIR/linux-3.11.tar.xz"
-rm "$DIR/linux-3.11.tar.xz"
-
-"$RDSQFS" -DSF -u / -p "$DIR/sqfs/" "$DIR/out1.sqfs"
-rm "$DIR/out1.sqfs"
-
-# every file that exists in the tar ball MUST exist in the squashfs image
-# and they MUST be identical
-find "$DIR/linux-3.11" -type f | sed "s#$DIR/##" | \
-while read fname; do
- set -e
- diff "$DIR/$fname" "$DIR/sqfs/$fname"
- rm "$DIR/sqfs/$fname" "$DIR/$fname"
- echo "match $DIR/$fname"
-done
-
-find "$DIR/linux-3.11" -type l | sed "s#$DIR/##" | \
-while read fname; do
- set -e
- a=$(readlink "$DIR/$fname")
- b=$(readlink "$DIR/sqfs/$fname")
- [ "x$a" = "x$b" ] || exit 1
- unlink "$DIR/sqfs/$fname"
- unlink "$DIR/$fname"
- echo "match $DIR/$fname"
-done
-
-# match directories and cleanup at the same time
-find "$DIR/linux-3.11" -type d | sed "s#$DIR/##" | sort -ur | \
-while read fname; do
- set -e
- rmdir "$DIR/$fname" "$DIR/sqfs/$fname"
-done
-
-rmdir "$DIR/sqfs"
-rmdir "$DIR"
-echo "DONE!"