mirror of
https://github.com/systemd/systemd.git
synced 2026-11-06 05:17:24 +00:00
fuzz-catalog: 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:
1 parent
e9005a6ae4
commit
19916b2955
1 file changed
+3
-2
@@ -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);
|
||||
|
||||
|
||||
Reference in new issue
Block a user