[systemd-devel] [PATCH 3/3] test-util: use assert_se() for call to safe_mkdir with side effect
Filipe Brandenburger
filbranden at google.com
Mon Aug 25 22:05:04 PDT 2014
Otherwise it gets optimized out when CPPFLAGS='-DNDEBUG' is used.
Tested:
- make check TESTS='test-util' CPPFLAGS='-DNDEBUG'
---
src/test/test-util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/test/test-util.c b/src/test/test-util.c
index 34d5f2ed7d23..4d9b28f9c8e7 100644
--- a/src/test/test-util.c
+++ b/src/test/test-util.c
@@ -863,7 +863,7 @@ static void test_readlink_and_make_absolute(void) {
char name_alias[] = "/tmp/test-readlink_and_make_absolute-alias";
char *r = NULL;
- assert(mkdir_safe(tempdir, 0755, getuid(), getgid()) >= 0);
+ assert_se(mkdir_safe(tempdir, 0755, getuid(), getgid()) >= 0);
assert_se(touch(name) >= 0);
assert_se(symlink(name, name_alias) >= 0);
--
1.9.3
More information about the systemd-devel
mailing list