Netbsd doesn't have ipfw, only the regular pf transport stuff.

Attempted fix for 19960.

Also, fixes a typo.
This commit is contained in:
Nick Mathewson 2016-12-07 15:21:21 -05:00
parent e7ade23f97
commit 53d4e89626
3 changed files with 16 additions and 3 deletions

4
changes/bug19960 Normal file
View File

@ -0,0 +1,4 @@
o Minor bugfixes (netbsd, unit tests):
- Stop expecting NetBSD unit tests to report success for ipfw;
on NetBSD, it's only pf that's supported.
Part of a fix for bug 19960; bugfix on 0.2.9.5-alpha.

View File

@ -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);