From f757737060d4daebb24a32e90d912661428708a8 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sun, 13 Sep 2020 13:37:42 +0200 Subject: Remodel libtar/tar2sqfs to read data from an istream_t Signed-off-by: David Oberhollenzer --- tests/tar_sparse.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tests/tar_sparse.c') diff --git a/tests/tar_sparse.c b/tests/tar_sparse.c index 50940d0..8e2976f 100644 --- a/tests/tar_sparse.c +++ b/tests/tar_sparse.c @@ -10,9 +10,10 @@ static void test_case_sparse(const char *path) { tar_header_decoded_t hdr; sparse_map_t *sparse; - FILE *fp; + istream_t *fp; - fp = test_open_read(path); + fp = istream_open_file(path); + TEST_NOT_NULL(fp); TEST_ASSERT(read_header(fp, &hdr) == 0); TEST_EQUAL_UI(hdr.sb.st_mode, S_IFREG | 0644); TEST_EQUAL_UI(hdr.sb.st_uid, 01750); @@ -72,7 +73,7 @@ static void test_case_sparse(const char *path) TEST_NULL(sparse); clear_header(&hdr); - fclose(fp); + sqfs_destroy(fp); } int main(void) -- cgit v1.2.3