summaryrefslogtreecommitdiff
path: root/src/test/test_util.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-03-06 11:03:26 -0500
committerNick Mathewson <nickm@torproject.org>2019-04-04 12:56:52 -0400
commit361e955cf3f852caebb63f618fbae883237bf28b (patch)
treef831c65ed4f3dcb27576b8e0743d516cc83da22d /src/test/test_util.c
parent12205c3cbee4e71ded2b5710a57342b510e9d6df (diff)
downloadtor-361e955cf3f852caebb63f618fbae883237bf28b.tar.gz
tor-361e955cf3f852caebb63f618fbae883237bf28b.zip
map_anon: define a macro if it is possible for noinherit to fail.
Diffstat (limited to 'src/test/test_util.c')
-rw-r--r--src/test/test_util.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/test_util.c b/src/test/test_util.c
index 039fc435ce..f6085fdb90 100644
--- a/src/test/test_util.c
+++ b/src/test/test_util.c
@@ -6224,11 +6224,17 @@ test_util_map_anon_nofork(void *arg)
int ws;
waitpid(child, &ws, 0);
+#ifndef NOINHERIT_CAN_FAIL
+ /* Only if NOINHERIT_CAN_FAIL should it be possible for us to get
+ * INHERIT_KEEP behavior in this case. */
+ tt_assert(inherit, OP_NE, INHERIT_KEEP);
+#else
if (inherit == INHERIT_KEEP) {
/* Call this test "skipped", not "passed", since noinherit wasn't
* implemented. */
tt_skip();
}
+#endif
done:
tor_munmap_anonymous(ptr, sz);