aboutsummaryrefslogtreecommitdiff
path: root/bin/gensquashfs/test
diff options
context:
space:
mode:
Diffstat (limited to 'bin/gensquashfs/test')
-rw-r--r--bin/gensquashfs/test/fstree_glob1.c48
1 files changed, 48 insertions, 0 deletions
diff --git a/bin/gensquashfs/test/fstree_glob1.c b/bin/gensquashfs/test/fstree_glob1.c
index f7a61e0..315ab74 100644
--- a/bin/gensquashfs/test/fstree_glob1.c
+++ b/bin/gensquashfs/test/fstree_glob1.c
@@ -43,6 +43,10 @@ static void check_hierarchy(tree_node_t *root, bool subdir, bool recursive)
TEST_ASSERT(S_ISREG(m->mode));
TEST_ASSERT(m->parent == n);
+ TEST_NOT_NULL(m->data.file.input_file);
+ TEST_STR_EQUAL(m->data.file.input_file,
+ "../../../lib/tar/test/data/file-size/gnu.tar");
+
m = m->next;
TEST_NULL(m);
} else {
@@ -62,12 +66,20 @@ static void check_hierarchy(tree_node_t *root, bool subdir, bool recursive)
TEST_ASSERT(S_ISREG(m->mode));
TEST_ASSERT(m->parent == n);
+ TEST_NOT_NULL(m->data.file.input_file);
+ TEST_STR_EQUAL(m->data.file.input_file,
+ "../../../lib/tar/test/data/format-acceptance/gnu-g.tar");
+
m = m->next;
TEST_NOT_NULL(m);
TEST_STR_EQUAL(m->name, "gnu.tar");
TEST_ASSERT(S_ISREG(m->mode));
TEST_ASSERT(m->parent == n);
+ TEST_NOT_NULL(m->data.file.input_file);
+ TEST_STR_EQUAL(m->data.file.input_file,
+ "../../../lib/tar/test/data/format-acceptance/gnu.tar");
+
m = m->next;
TEST_NULL(m);
} else {
@@ -94,6 +106,10 @@ static void check_hierarchy(tree_node_t *root, bool subdir, bool recursive)
TEST_ASSERT(S_ISREG(m->mode));
TEST_ASSERT(m->parent == n);
+ TEST_NOT_NULL(m->data.file.input_file);
+ TEST_STR_EQUAL(m->data.file.input_file,
+ "../../../lib/tar/test/data/large-mtime/gnu.tar");
+
m = m->next;
TEST_NULL(m);
} else {
@@ -113,6 +129,10 @@ static void check_hierarchy(tree_node_t *root, bool subdir, bool recursive)
TEST_ASSERT(S_ISREG(m->mode));
TEST_ASSERT(m->parent == n);
+ TEST_NOT_NULL(m->data.file.input_file);
+ TEST_STR_EQUAL(m->data.file.input_file,
+ "../../../lib/tar/test/data/long-paths/gnu.tar");
+
m = m->next;
TEST_NULL(m);
} else {
@@ -132,6 +152,10 @@ static void check_hierarchy(tree_node_t *root, bool subdir, bool recursive)
TEST_ASSERT(S_ISREG(m->mode));
TEST_ASSERT(m->parent == n);
+ TEST_NOT_NULL(m->data.file.input_file);
+ TEST_STR_EQUAL(m->data.file.input_file,
+ "../../../lib/tar/test/data/negative-mtime/gnu.tar");
+
m = m->next;
TEST_NULL(m);
} else {
@@ -151,30 +175,50 @@ static void check_hierarchy(tree_node_t *root, bool subdir, bool recursive)
TEST_ASSERT(S_ISREG(m->mode));
TEST_ASSERT(m->parent == n);
+ TEST_NOT_NULL(m->data.file.input_file);
+ TEST_STR_EQUAL(m->data.file.input_file,
+ "../../../lib/tar/test/data/sparse-files/gnu-small.tar");
+
m = m->next;
TEST_NOT_NULL(m);
TEST_STR_EQUAL(m->name, "gnu.tar");
TEST_ASSERT(S_ISREG(m->mode));
TEST_ASSERT(m->parent == n);
+ TEST_NOT_NULL(m->data.file.input_file);
+ TEST_STR_EQUAL(m->data.file.input_file,
+ "../../../lib/tar/test/data/sparse-files/gnu.tar");
+
m = m->next;
TEST_NOT_NULL(m);
TEST_STR_EQUAL(m->name, "pax-gnu0-0.tar");
TEST_ASSERT(S_ISREG(m->mode));
TEST_ASSERT(m->parent == n);
+ TEST_NOT_NULL(m->data.file.input_file);
+ TEST_STR_EQUAL(m->data.file.input_file,
+ "../../../lib/tar/test/data/sparse-files/pax-gnu0-0.tar");
+
m = m->next;
TEST_NOT_NULL(m);
TEST_STR_EQUAL(m->name, "pax-gnu0-1.tar");
TEST_ASSERT(S_ISREG(m->mode));
TEST_ASSERT(m->parent == n);
+ TEST_NOT_NULL(m->data.file.input_file);
+ TEST_STR_EQUAL(m->data.file.input_file,
+ "../../../lib/tar/test/data/sparse-files/pax-gnu0-1.tar");
+
m = m->next;
TEST_NOT_NULL(m);
TEST_STR_EQUAL(m->name, "pax-gnu1-0.tar");
TEST_ASSERT(S_ISREG(m->mode));
TEST_ASSERT(m->parent == n);
+ TEST_NOT_NULL(m->data.file.input_file);
+ TEST_STR_EQUAL(m->data.file.input_file,
+ "../../../lib/tar/test/data/sparse-files/pax-gnu1-0.tar");
+
m = m->next;
TEST_NULL(m);
} else {
@@ -194,6 +238,10 @@ static void check_hierarchy(tree_node_t *root, bool subdir, bool recursive)
TEST_ASSERT(S_ISREG(m->mode));
TEST_ASSERT(m->parent == n);
+ TEST_NOT_NULL(m->data.file.input_file);
+ TEST_STR_EQUAL(m->data.file.input_file,
+ "../../../lib/tar/test/data/user-group-largenum/gnu.tar");
+
m = m->next;
TEST_NULL(m);
} else {