diff options
author | Filipe Brandenburger <filbranden@google.com> | 2014-12-23 10:14:46 -0800 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-12-25 11:55:12 -0500 |
commit | e50221bf1ae8bc8e14f242efa4c9d26b7a47639b (patch) | |
tree | 1a979c828fbe59e466754de3504cdb6a9a039daa | |
parent | 0a7f0fcc79772d257e0c42358ad472a37a8ab151 (diff) |
test: only use assert_se in test_raw_clone
The asserts used in the tests should never be allowed to be optimized away.
-rw-r--r-- | src/test/test-util.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/test-util.c b/src/test/test-util.c index 222af9a73a..57fd19b2a3 100644 --- a/src/test/test-util.c +++ b/src/test/test-util.c @@ -420,7 +420,7 @@ static void check(const char *test, char** expected, bool trailing) { printf("<%s>\n", t); } printf("<<<%s>>>\n", state); - assert(expected[i] == NULL); + assert_se(expected[i] == NULL); assert_se(isempty(state) == !trailing); } @@ -1331,15 +1331,15 @@ static void test_raw_clone(void) { assert_se(raw_getpid() == parent); pid = raw_clone(0, NULL); - assert(pid >= 0); + assert_se(pid >= 0); pid2 = raw_getpid(); log_info("raw_clone: "PID_FMT" getpid()→"PID_FMT" raw_getpid()→"PID_FMT, pid, getpid(), pid2); if (pid == 0) - assert(pid2 != parent); + assert_se(pid2 != parent); else - assert(pid2 == parent); + assert_se(pid2 == parent); } int main(int argc, char *argv[]) { |