'Twas brillig, and Mike Gilbert at 12/04/14 20:54 did gyre and gimble: > On Sat, Apr 12, 2014 at 3:10 PM, Mike Gilbert <flop...@gentoo.org> wrote: >> On Sat, Apr 12, 2014 at 1:40 PM, Zbigniew Jędrzejewski-Szmek >> <zbys...@in.waw.pl> wrote: >>>> +static void test_fsck_exists(void) { >>>> + /* Ensure we use a sane default for PATH. */ >>>> + unsetenv("PATH"); >>>> + >>>> + /* fsck.minix is provided by util-linux and will probably exist. >>>> */ >>>> + assert(fsck_exists("minix") == 0); >>>> + >>>> + assert(fsck_exists("AbCdE") == -ENOENT); >>>> +} >>> assert_se(). >>> >> >> We are comparing integers, not strings. This matches the other integer >> comparisons in this source file. >> > > I guess I have misinterpreted what "assert_se" means... is that > documented somewhere?
the _se suffix just means "side effect". So if systemd were compiled without asserts the action would still happen (whereas a normal assert() is totally skipped). In this case the side effect is actually calling fsck_exists(). Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited http://www.tribalogic.net/ Open Source: Mageia Contributor http://www.mageia.org/ PulseAudio Hacker http://www.pulseaudio.org/ Trac Hacker http://trac.edgewall.org/ _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel