summaryrefslogtreecommitdiff
path: root/src/test/test-cgroup.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-cgroup.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-cgroup.c')
-rw-r--r--src/test/test-cgroup.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/test/test-cgroup.c b/src/test/test-cgroup.c
index 2a0ce27206..46642f92fe 100644
--- a/src/test/test-cgroup.c
+++ b/src/test/test-cgroup.c
@@ -79,8 +79,8 @@ int main(int argc, char*argv[]) {
assert_se(cg_delete(SYSTEMD_CGROUP_CONTROLLER, "/test-a") >= 0);
assert_se(cg_split_spec("foobar:/", &c, &p) == 0);
- assert(streq(c, "foobar"));
- assert(streq(p, "/"));
+ assert_se(streq(c, "foobar"));
+ assert_se(streq(p, "/"));
free(c);
free(p);
@@ -92,13 +92,13 @@ int main(int argc, char*argv[]) {
assert_se(cg_split_spec("fo/obar:/", &c, &p) < 0);
assert_se(cg_split_spec("/", &c, &p) >= 0);
- assert(c == NULL);
- assert(streq(p, "/"));
+ assert_se(c == NULL);
+ assert_se(streq(p, "/"));
free(p);
assert_se(cg_split_spec("foo", &c, &p) >= 0);
- assert(streq(c, "foo"));
- assert(p == NULL);
+ assert_se(streq(c, "foo"));
+ assert_se(p == NULL);
free(c);
return 0;