]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
log: make assert_return() critical when -Dmode=developer 30049/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 17 Nov 2023 19:18:44 +0000 (04:18 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 23 Dec 2023 17:03:30 +0000 (02:03 +0900)
Triggering assert_return() should be a bug in general, and we should
really fix that.  But, previously, it is hard to notice such bug, as
it was not critical.
This is for making CI or our testing environment fail if we unexpectedly
trigger assert_return(). So, hopefully we can easily find such bugs.

src/basic/log.c

index 8bcdfa03e5833cf562096529f88794a94bdf7e0e..7ddca92afa8a3bd9b1aabb50fe66aedc18233b1a 100644 (file)
@@ -69,7 +69,7 @@ static bool upgrade_syslog_to_journal = false;
 static bool always_reopen_console = false;
 static bool open_when_needed = false;
 static bool prohibit_ipc = false;
-static bool assert_return_is_critical = false;
+static bool assert_return_is_critical = BUILD_MODE_DEVELOPER;
 
 /* Akin to glibc's __abort_msg; which is private and we hence cannot
  * use here. */