fuzz-varlink-idl: use ASSERT_OK() and friends

Replace assert_se() with the typed ASSERT_* macros, so that a failing
assertion logs the values involved.
This commit is contained in:
Yu Watanabe committed 2026-11-05 03:21:37 +09:00
1 parent a04e2d447a
commit 5b3b5efd79
1 file changed
+3 -2
+3 -2
View File
@@ -5,6 +5,7 @@
#include "alloc-util.h"
#include "fuzz.h"
#include "log.h"
#include "tests.h"
#include "varlink-idl-util.h"
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
@@ -17,7 +18,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
fuzz_setup_logging();
assert_se(str = memdup_suffix0(data, size));
str = ASSERT_NOT_NULL(memdup_suffix0(data, size));
r = sd_varlink_idl_parse(str, /* reterr_line= */ NULL, /* reterr_column= */ NULL, &vi);
if (r < 0) {
@@ -25,7 +26,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
return 0;
}
assert_se(sd_varlink_idl_format(vi, &dump) >= 0);
ASSERT_OK(sd_varlink_idl_format(vi, &dump));
(void) varlink_idl_consistent(vi, LOG_DEBUG);
return 0;