summaryrefslogtreecommitdiff
path: root/src/test/test-util.c
diff options
context:
space:
mode:
authorFilipe Brandenburger <filbranden@google.com>2014-08-25 22:05:04 -0700
committerLennart Poettering <lennart@poettering.net>2014-08-26 20:31:33 +0200
commit684fc8927e0f83496d4384ac434e265f7cd7a87b (patch)
tree82bc059c4007bfcfce891ac983df4de02db956f7 /src/test/test-util.c
parent8d95631ea6c039a60bb7ac456f687a8fdf0c4381 (diff)
test-util: use assert_se() for call to safe_mkdir with side effect
Otherwise it gets optimized out when CPPFLAGS='-DNDEBUG' is used. Tested: - make check TESTS='test-util' CPPFLAGS='-DNDEBUG'
Diffstat (limited to 'src/test/test-util.c')
-rw-r--r--src/test/test-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/test-util.c b/src/test/test-util.c
index 34d5f2ed7d..4d9b28f9c8 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);