]> git.ipfire.org Git - pakfire.git/commitdiff
tests: Check if snapshot has something in it
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 19 Jul 2022 14:31:57 +0000 (14:31 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 19 Jul 2022 14:31:57 +0000 (14:31 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
tests/libpakfire/snapshot.c

index 710b7ba66ee9a40153d3332054943b6d9cfe0553..9105f3bd375397769f030cab470099cbe6bd741f 100644 (file)
@@ -37,10 +37,13 @@ static int test_create_and_restore(const struct test* t) {
        ASSERT_SUCCESS(pakfire_snapshot_create(t->pakfire, f));
 
        // Determine the size of the snapshot
-       off_t size = ftell(f);
+       size_t size = ftell(f);
 
        LOG("Snapshot has a size of %jd bytes\n", size);
 
+       // Check if the snapshot has something in it
+       ASSERT(size >= 1024);
+
        // Rewind the file descriptor to the beginning
        rewind(f);