From: Michael Tremer Date: Tue, 19 Jul 2022 14:31:57 +0000 (+0000) Subject: tests: Check if snapshot has something in it X-Git-Tag: 0.9.28~672 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d907e471dbc0ad736c269ec4c4fa19da122583dc;p=pakfire.git tests: Check if snapshot has something in it Signed-off-by: Michael Tremer --- diff --git a/tests/libpakfire/snapshot.c b/tests/libpakfire/snapshot.c index 710b7ba66..9105f3bd3 100644 --- a/tests/libpakfire/snapshot.c +++ b/tests/libpakfire/snapshot.c @@ -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);