From 19916b2955cc7e9211ddc44c60dbd4316142c1a4 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Wed, 4 Nov 2026 22:26:58 +0900 Subject: [PATCH] fuzz-catalog: use ASSERT_OK() and friends Replace assert_se() with the typed ASSERT_* macros, so that a failing assertion logs the values involved. --- src/fuzz/fuzz-catalog.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/fuzz/fuzz-catalog.c b/src/fuzz/fuzz-catalog.c index 3c13db2c9b5..a586d11e702 100644 --- a/src/fuzz/fuzz-catalog.c +++ b/src/fuzz/fuzz-catalog.c @@ -6,6 +6,7 @@ #include "fd-util.h" #include "fuzz.h" #include "hashmap.h" +#include "tests.h" #include "tmpfile-util.h" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { @@ -16,8 +17,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { fuzz_setup_logging(); fd = mkostemp_safe(name); - assert_se(fd >= 0); - assert_se(write(fd, data, size) == (ssize_t) size); + ASSERT_OK(fd); + ASSERT_EQ(write(fd, data, size), (ssize_t) size); (void) catalog_import_file(&h, fd, name);