summaryrefslogtreecommitdiff
path: root/src/test/test-tmpfiles.c
diff options
context:
space:
mode:
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>2014-10-04 23:51:45 +0200
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>2014-10-04 23:55:35 +0200
commitbdf7026e9557349cd3eeb291c01655d5f2a55db8 (patch)
tree10d269fed663e99d659c34e2f8e89fe5b3f55ecd /src/test/test-tmpfiles.c
parent2355af60dc0c0ec2b7fbe69f15a77d980b017b3f (diff)
test: only use assert_se
The asserts used in the tests should never be allowed to be optimized away
Diffstat (limited to 'src/test/test-tmpfiles.c')
-rw-r--r--src/test/test-tmpfiles.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/test-tmpfiles.c b/src/test/test-tmpfiles.c
index 565f0f8b40..84050c6fa4 100644
--- a/src/test/test-tmpfiles.c
+++ b/src/test/test-tmpfiles.c
@@ -35,13 +35,13 @@ int main(int argc, char** argv) {
_cleanup_free_ char *cmd, *cmd2;
fd = open_tmpfile(p, O_RDWR|O_CLOEXEC);
- assert(fd >= 0);
+ assert_se(fd >= 0);
assert_se(asprintf(&cmd, "ls -l /proc/"PID_FMT"/fd/%d", getpid(), fd) > 0);
system(cmd);
fd2 = mkostemp_safe(pattern, O_RDWR|O_CLOEXEC);
- assert(fd >= 0);
+ assert_se(fd >= 0);
assert_se(unlink(pattern) == 0);
assert_se(asprintf(&cmd2, "ls -l /proc/"PID_FMT"/fd/%d", getpid(), fd2) > 0);