Make sure passthrough_test_setup doesn't inadvertently fail or skip tests

passthrough_test_setup doesn't pass through arguments if the argument
is equal to 0 or TT_SKIP. Instead, it fails or skips the test.

Assert on this, so we don't accidentally fail or skip tests.
This commit is contained in:
teor 2016-11-02 14:16:14 +11:00
parent 77e1d660ee
commit 13fbbe9cce
No known key found for this signature in database
GPG Key ID: 450CBA7F968F094B
1 changed files with 3 additions and 0 deletions

View File

@ -240,6 +240,9 @@ free_pregenerated_keys(void)
static void *
passthrough_test_setup(const struct testcase_t *testcase)
{
/* Make sure the passthrough doesn't unintentionally fail or skip tests */
tor_assert(testcase->setup_data);
tor_assert(testcase->setup_data != (void*)TT_SKIP);
return testcase->setup_data;
}
static int