diff options
author | Filipe Brandenburger <filbranden@google.com> | 2014-08-25 22:05:02 -0700 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-08-26 20:31:27 +0200 |
commit | 52754725e185f1331f821d85ed2ef78fb92af1fe (patch) | |
tree | be5c8e531d3b6dbe81779c3974f808296bf42c21 /src | |
parent | 32dfe42c66085c55916e5306a9a07d42d3958b6b (diff) |
test-compress: make sure asserts with side effects use assert_se()
Otherwise the test fails when built with CPPFLAGS='-DNDEBUG' which disables
assertions.
Tested:
- make check TESTS='test-compress' CPPFLAGS='-DNDEBUG'
Diffstat (limited to 'src')
-rw-r--r-- | src/journal/test-compress.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/journal/test-compress.c b/src/journal/test-compress.c index f5f5f8df39..026d630ac2 100644 --- a/src/journal/test-compress.c +++ b/src/journal/test-compress.c @@ -145,11 +145,11 @@ static void test_compress_stream(int compression, assert_se((dst = mkostemp_safe(pattern, O_RDWR|O_CLOEXEC)) >= 0); - assert(compress(src, dst, -1) == 0); + assert_se(compress(src, dst, -1) == 0); if (cat) { assert_se(asprintf(&cmd, "%s %s | diff %s -", cat, pattern, srcfile) > 0); - assert(system(cmd) == 0); + assert_se(system(cmd) == 0); } log_debug("/* test decompression */"); |