diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2023-02-12 12:28:40 +0100 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2023-02-12 12:28:40 +0100 |
commit | b635c78530d5d7f27f9805790c1f7ca227959177 (patch) | |
tree | 9581e10402219bcae6009c81087a9f525e8cece3 /bin | |
parent | 9a7a07d047b6baffb095f16074402630fe2f0270 (diff) |
libtar: Add a test for the tar writing code
Generate a simple tarball and compare it with a reference.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'bin')
-rw-r--r-- | bin/gensquashfs/test/fstree_glob1.c | 7 | ||||
-rw-r--r-- | bin/tar2sqfs/test/sqfs.sha512 | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/bin/gensquashfs/test/fstree_glob1.c b/bin/gensquashfs/test/fstree_glob1.c index 5f4fdfe..2d3cb80 100644 --- a/bin/gensquashfs/test/fstree_glob1.c +++ b/bin/gensquashfs/test/fstree_glob1.c @@ -202,6 +202,13 @@ static void check_hierarchy(tree_node_t *root, bool subdir, bool recursive) n = n->next; TEST_NOT_NULL(n); + TEST_STR_EQUAL(n->name, "write"); + TEST_ASSERT(S_ISDIR(n->mode)); + TEST_ASSERT(n->parent == parentdir); + TEST_NULL(n->data.dir.children); + + n = n->next; + TEST_NOT_NULL(n); TEST_STR_EQUAL(n->name, "xattr"); TEST_ASSERT(S_ISDIR(n->mode)); TEST_ASSERT(n->parent == parentdir); diff --git a/bin/tar2sqfs/test/sqfs.sha512 b/bin/tar2sqfs/test/sqfs.sha512 index 609e154..a915b02 100644 --- a/bin/tar2sqfs/test/sqfs.sha512 +++ b/bin/tar2sqfs/test/sqfs.sha512 @@ -25,4 +25,5 @@ a5e95c464f41249da9a4156db3a23d30e01652881e839912f632f2614f1775e62a3fed184efbec1a 627a69ed25f9b5380d269fbe12603818d73b29d6a1155fcf7bebca2ba30ec1cce7b8405394498333f9847f10f0768b80b94b723551dbff10c633d2887e62b804 test_tar/data/xattr/xattr-schily.sqfs 627a69ed25f9b5380d269fbe12603818d73b29d6a1155fcf7bebca2ba30ec1cce7b8405394498333f9847f10f0768b80b94b723551dbff10c633d2887e62b804 test_tar/data/xattr/xattr-libarchive.sqfs b8e0e1cb41663c3d6278bf214234ac00ae8b86b9bc16d086bd0a7bfa9b0d28d626f70c6a1bd6f05dbbfa46431ce3f4518a4be38caf87b1f071d57edae24c5b10 test_tar/data/xattr/acl.sqfs +6b201a275180d93459f6e9d94900a9bbb14da1c4f68cc7ca5850eb8cab982617ec6ae5695ca3c23c6cbbfa93cc3957367d4f3ae636706ef176059090b3d92c3f test_tar/data/write/simple.sqfs bae693082a771c500c2d6b52a8eeb91decd98e90eaae379951bcc80589533ff43b58375f8a7f3de77c35456ee7fb269a6b17e4c29b291475578ba8453f152d0e test_tar/root-becomes.sqfs |