From d907e471dbc0ad736c269ec4c4fa19da122583dc Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 19 Jul 2022 14:31:57 +0000 Subject: [PATCH] tests: Check if snapshot has something in it Signed-off-by: Michael Tremer --- tests/libpakfire/snapshot.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); -- 2.47.3