summaryrefslogtreecommitdiff
path: root/src/test/testing_common.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-09-09 08:55:11 -0400
committerNick Mathewson <nickm@torproject.org>2016-09-09 08:58:42 -0400
commit05110c9294f64b494600b056670f62ca89b52b0b (patch)
tree3b7deb62446d8984e2543587144b6d7886504192 /src/test/testing_common.c
parent5ec395b27fd9ccb3fcac627d1ae323c4d06130f3 (diff)
downloadtor-05110c9294f64b494600b056670f62ca89b52b0b.tar.gz
tor-05110c9294f64b494600b056670f62ca89b52b0b.zip
Move the donna-fuzzing tests into test_slow.
This shaves another 3-4 seconds off the main-path tests for me, which is again worth it, according to XKCD#1204.
Diffstat (limited to 'src/test/testing_common.c')
-rw-r--r--src/test/testing_common.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/testing_common.c b/src/test/testing_common.c
index dedacf87fc..2858c9ec99 100644
--- a/src/test/testing_common.c
+++ b/src/test/testing_common.c
@@ -213,6 +213,25 @@ passthrough_test_cleanup(const struct testcase_t *testcase, void *ptr)
return 1;
}
+
+static void *
+ed25519_testcase_setup(const struct testcase_t *testcase)
+{
+ crypto_ed25519_testing_force_impl(testcase->setup_data);
+ return testcase->setup_data;
+}
+static int
+ed25519_testcase_cleanup(const struct testcase_t *testcase, void *ptr)
+{
+ (void)testcase;
+ (void)ptr;
+ crypto_ed25519_testing_restore_impl();
+ return 1;
+}
+const struct testcase_setup_t ed25519_test_setup = {
+ ed25519_testcase_setup, ed25519_testcase_cleanup
+};
+
const struct testcase_setup_t passthrough_setup = {
passthrough_test_setup, passthrough_test_cleanup
};