summaryrefslogtreecommitdiff
path: root/tests/gensquashfs/fstree_from_dir.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2024-09-26 08:27:13 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2024-09-26 08:27:13 +0200
commitcd1ec786238202b987a7624e763dadc725a46a67 (patch)
treee37ced7ec184d7708c00fd98a516a0ede7d2cded /tests/gensquashfs/fstree_from_dir.c
parent8f9966c8ea3ea8a854941d041e7fcb9eb4f772fb (diff)
Fix prefix path for file globing
Reported-by: Sebastian Birunt <sebastian.birunt@arm.com> Suggested-by: Sebastian Birunt <sebastian.birunt@arm.com> Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'tests/gensquashfs/fstree_from_dir.c')
-rw-r--r--tests/gensquashfs/fstree_from_dir.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/gensquashfs/fstree_from_dir.c b/tests/gensquashfs/fstree_from_dir.c
index 5e73fa4..39dfd19 100644
--- a/tests/gensquashfs/fstree_from_dir.c
+++ b/tests/gensquashfs/fstree_from_dir.c
@@ -24,18 +24,21 @@ static void check_hierarchy(tree_node_t *root, bool recursive)
TEST_NOT_NULL(m);
TEST_STR_EQUAL(m->name, "file_a0");
TEST_ASSERT(S_ISREG(m->mode));
+ TEST_STR_EQUAL(m->data.file.input_file, "dira/file_a0");
TEST_ASSERT(m->parent == n);
m = m->next;
TEST_NOT_NULL(m);
TEST_STR_EQUAL(m->name, "file_a1");
TEST_ASSERT(S_ISREG(m->mode));
+ TEST_STR_EQUAL(m->data.file.input_file, "dira/file_a1");
TEST_ASSERT(m->parent == n);
m = m->next;
TEST_NOT_NULL(m);
TEST_STR_EQUAL(m->name, "file_a2");
TEST_ASSERT(S_ISREG(m->mode));
+ TEST_STR_EQUAL(m->data.file.input_file, "dira/file_a2");
TEST_ASSERT(m->parent == n);
m = m->next;
@@ -55,18 +58,21 @@ static void check_hierarchy(tree_node_t *root, bool recursive)
TEST_NOT_NULL(m);
TEST_STR_EQUAL(m->name, "file_b0");
TEST_ASSERT(S_ISREG(m->mode));
+ TEST_STR_EQUAL(m->data.file.input_file, "dirb/file_b0");
TEST_ASSERT(m->parent == n);
m = m->next;
TEST_NOT_NULL(m);
TEST_STR_EQUAL(m->name, "file_b1");
TEST_ASSERT(S_ISREG(m->mode));
+ TEST_STR_EQUAL(m->data.file.input_file, "dirb/file_b1");
TEST_ASSERT(m->parent == n);
m = m->next;
TEST_NOT_NULL(m);
TEST_STR_EQUAL(m->name, "file_b2");
TEST_ASSERT(S_ISREG(m->mode));
+ TEST_STR_EQUAL(m->data.file.input_file, "dirb/file_b2");
TEST_ASSERT(m->parent == n);
m = m->next;
@@ -86,18 +92,21 @@ static void check_hierarchy(tree_node_t *root, bool recursive)
TEST_NOT_NULL(m);
TEST_STR_EQUAL(m->name, "file_c0");
TEST_ASSERT(S_ISREG(m->mode));
+ TEST_STR_EQUAL(m->data.file.input_file, "dirc/file_c0");
TEST_ASSERT(m->parent == n);
m = m->next;
TEST_NOT_NULL(m);
TEST_STR_EQUAL(m->name, "file_c1");
TEST_ASSERT(S_ISREG(m->mode));
+ TEST_STR_EQUAL(m->data.file.input_file, "dirc/file_c1");
TEST_ASSERT(m->parent == n);
m = m->next;
TEST_NOT_NULL(m);
TEST_STR_EQUAL(m->name, "file_c2");
TEST_ASSERT(S_ISREG(m->mode));
+ TEST_STR_EQUAL(m->data.file.input_file, "dirc/file_c2");
TEST_ASSERT(m->parent == n);
m = m->next;