diff --git a/src/test/test-reread-partition-table.c b/src/test/test-reread-partition-table.c index 5f465e61db..cff31f41a1 100644 --- a/src/test/test-reread-partition-table.c +++ b/src/test/test-reread-partition-table.c @@ -70,6 +70,8 @@ TEST(rereadpt) { LOCK_EX, &loop); if (ERRNO_IS_NEG_PRIVILEGE(r) || ERRNO_IS_NOT_SUPPORTED(r)) return (void) log_tests_skipped("loopback block devices not available"); + if (r < 0) + return (void) log_error_errno(r, "Failed to create loop device: %m"); _cleanup_free_ char *p = NULL; ASSERT_OK(partition_node_of(loop->node, 1, &p));