aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_options.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-12-07 15:21:21 -0500
committerNick Mathewson <nickm@torproject.org>2016-12-07 15:22:44 -0500
commit53d4e89626856eabe235c50ffc3d6a697f176741 (patch)
treed6e3619acf2e4ab1af9b728a4eb10c1e286911d8 /src/test/test_options.c
parente7ade23f9723f55a504ebd8279cbadf0aca108c6 (diff)
downloadtor-53d4e89626856eabe235c50ffc3d6a697f176741.tar.gz
tor-53d4e89626856eabe235c50ffc3d6a697f176741.zip
Netbsd doesn't have ipfw, only the regular pf transport stuff.
Attempted fix for 19960. Also, fixes a typo.
Diffstat (limited to 'src/test/test_options.c')
-rw-r--r--src/test/test_options.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/test/test_options.c b/src/test/test_options.c
index 6770c16140..2570f8ddb4 100644
--- a/src/test/test_options.c
+++ b/src/test/test_options.c
@@ -1050,7 +1050,7 @@ test_options_validate__transproxy(void *ignored)
tt_int_op(ret, OP_EQ, -1);
#ifndef KERNEL_MAY_SUPPORT_IPFW
- tt_str_op(msg, OP_EQ, "ipfw is a FreeBSD-specificand OS X/Darwin-specific "
+ tt_str_op(msg, OP_EQ, "ipfw is a FreeBSD-specific and OS X/Darwin-specific "
"feature.");
#else
tt_int_op(tdata->opt->TransProxyType_parsed, OP_EQ, TPT_IPFW);
@@ -1080,7 +1080,7 @@ test_options_validate__transproxy(void *ignored)
TT_DIE(("Expected NULL but got '%s'", msg));
}
#endif
-#if defined(__FreeBSD_kernel__) || defined( DARWIN ) || defined(__NetBSD__)
+#ifdef KERNEL_MAY_SUPPORT_IPFW
tdata = get_options_test_data("TransProxyType ipfw\n"
"TransPort 127.0.0.1:123\n");
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
@@ -1098,6 +1098,15 @@ test_options_validate__transproxy(void *ignored)
TT_DIE(("Expected NULL but got '%s'", msg));
}
#endif
+#if defined(__NetBSD__)
+ tdata = get_options_test_data("TransProxyType default\n"
+ "TransPort 127.0.0.1:123\n");
+ ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
+ tt_int_op(ret, OP_EQ, -1);
+ if (msg) {
+ TT_DIE(("Expected NULL but got '%s'", msg));
+ }
+#endif
// Assert that a test has run for some TransProxyType
tt_assert(tdata);