summaryrefslogtreecommitdiff
path: root/src/journal/test-mmap-cache.c
diff options
context:
space:
mode:
authorRonny Chevalier <chevalier.ronny@gmail.com>2014-11-30 02:16:19 +0100
committerRonny Chevalier <chevalier.ronny@gmail.com>2014-11-30 02:35:52 +0100
commit787784c4c1b24a13207d18b415d60483cfbdeaa3 (patch)
tree66b49b1a8e589fb38aa34d0208e6bc6c0b1a69f2 /src/journal/test-mmap-cache.c
parent30fbcf24460263961855e0ce4d8867fd2af3e149 (diff)
tests: use assert_se instead of assert
Otherwise they can be optimized away with -DNDEBUG
Diffstat (limited to 'src/journal/test-mmap-cache.c')
-rw-r--r--src/journal/test-mmap-cache.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/journal/test-mmap-cache.c b/src/journal/test-mmap-cache.c
index 778e884c3f..1227b62310 100644
--- a/src/journal/test-mmap-cache.c
+++ b/src/journal/test-mmap-cache.c
@@ -38,37 +38,37 @@ int main(int argc, char *argv[]) {
assert_se(m = mmap_cache_new());
x = mkostemp_safe(px, O_RDWR|O_CLOEXEC);
- assert(x >= 0);
+ assert_se(x >= 0);
unlink(px);
y = mkostemp_safe(py, O_RDWR|O_CLOEXEC);
- assert(y >= 0);
+ assert_se(y >= 0);
unlink(py);
z = mkostemp_safe(pz, O_RDWR|O_CLOEXEC);
- assert(z >= 0);
+ assert_se(z >= 0);
unlink(pz);
r = mmap_cache_get(m, x, PROT_READ, 0, false, 1, 2, NULL, &p, NULL);
- assert(r >= 0);
+ assert_se(r >= 0);
r = mmap_cache_get(m, x, PROT_READ, 0, false, 2, 2, NULL, &q, NULL);
- assert(r >= 0);
+ assert_se(r >= 0);
- assert((uint8_t*) p + 1 == (uint8_t*) q);
+ assert_se((uint8_t*) p + 1 == (uint8_t*) q);
r = mmap_cache_get(m, x, PROT_READ, 1, false, 3, 2, NULL, &q, NULL);
- assert(r >= 0);
+ assert_se(r >= 0);
- assert((uint8_t*) p + 2 == (uint8_t*) q);
+ assert_se((uint8_t*) p + 2 == (uint8_t*) q);
r = mmap_cache_get(m, x, PROT_READ, 0, false, 16ULL*1024ULL*1024ULL, 2, NULL, &p, NULL);
- assert(r >= 0);
+ assert_se(r >= 0);
r = mmap_cache_get(m, x, PROT_READ, 1, false, 16ULL*1024ULL*1024ULL+1, 2, NULL, &q, NULL);
- assert(r >= 0);
+ assert_se(r >= 0);
- assert((uint8_t*) p + 1 == (uint8_t*) q);
+ assert_se((uint8_t*) p + 1 == (uint8_t*) q);
mmap_cache_unref(m);