summaryrefslogtreecommitdiffstats
path: root/src/fuzz
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2023-12-23 17:49:57 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2023-12-23 18:02:18 +0100
commit8161f6086e56dc494a976a6eba14d3d4286ef6a0 (patch)
tree0d9cb3605e25c0b3505a324be754414d62f04162 /src/fuzz
parentlog: introduce a knob to make assert_return() critical (diff)
downloadsystemd-8161f6086e56dc494a976a6eba14d3d4286ef6a0.tar.xz
systemd-8161f6086e56dc494a976a6eba14d3d4286ef6a0.zip
test: make assert_return() critical by default on fuzzer and unit tests
Several test cases intentionally trigger assert_return(). So, to avoid the entire test fails, this introduces several macros that tentatively make assert_return() not critical.
Diffstat (limited to 'src/fuzz')
-rw-r--r--src/fuzz/fuzz.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/fuzz/fuzz.h b/src/fuzz/fuzz.h
index 698ba42d2f..7afe38ed1f 100644
--- a/src/fuzz/fuzz.h
+++ b/src/fuzz/fuzz.h
@@ -31,6 +31,7 @@ static inline bool outside_size_range(size_t size, size_t lower, size_t upper) {
static inline void fuzz_setup_logging(void) {
/* We don't want to fill the logs and slow down stuff when running
* in a fuzzing mode, so disable most of the logging. */
+ log_set_assert_return_is_critical(true);
log_set_max_level(LOG_CRIT);
log_parse_environment();
log_open();