|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
From 684fc8927e0f83496d4384ac434e265f7cd7a87b Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
From: Filipe Brandenburger <filbranden@google.com>
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Date: Mon, 25 Aug 2014 22:05:04 -0700
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Subject: [PATCH] test-util: use assert_se() for call to safe_mkdir with side
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
effect
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Otherwise it gets optimized out when CPPFLAGS='-DNDEBUG' is used.
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Tested:
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- make check TESTS='test-util' CPPFLAGS='-DNDEBUG'
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
src/test/test-util.c | 2 +-
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
diff --git a/src/test/test-util.c b/src/test/test-util.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
index 34d5f2ed7d..4d9b28f9c8 100644
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
--- a/src/test/test-util.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+++ b/src/test/test-util.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
@@ -863,7 +863,7 @@ static void test_readlink_and_make_absolute(void) {
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
char name_alias[] = "/tmp/test-readlink_and_make_absolute-alias";
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
char *r = NULL;
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- assert(mkdir_safe(tempdir, 0755, getuid(), getgid()) >= 0);
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ assert_se(mkdir_safe(tempdir, 0755, getuid(), getgid()) >= 0);
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
assert_se(touch(name) >= 0);
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
assert_se(symlink(name, name_alias) >= 0);
|