summaryrefslogtreecommitdiff
path: root/p11-kit
diff options
context:
space:
mode:
authorDaiki Ueno <dueno@redhat.com>2016-09-21 14:50:38 +0200
committerDaiki Ueno <ueno@gnu.org>2016-10-31 15:24:17 +0100
commitb6305c66bfb607f49c99f820e7123c753364e894 (patch)
tree3784fbd39aec33e32b5fab280e17f98f7ba73fde /p11-kit
parentbc6469c4fd576c698bab9c8b620de00d7ba1fe1a (diff)
test: Remove /proxy/deinit-after-fork test
This test hasn't been working since the removal of the pthread_atfork() deinit code. To properly clean up, the child process needs to call C_Initialize() and C_Finalize(), and it is already tested by /proxy/initialize-child.
Diffstat (limited to 'p11-kit')
-rw-r--r--p11-kit/test-proxy.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/p11-kit/test-proxy.c b/p11-kit/test-proxy.c
index 0fb270b..9d894bf 100644
--- a/p11-kit/test-proxy.c
+++ b/p11-kit/test-proxy.c
@@ -115,42 +115,6 @@ test_initialize_multiple (void)
#ifndef _WIN32
static void
-test_deinit_after_fork (void)
-{
- CK_FUNCTION_LIST_PTR proxy;
- CK_RV rv;
- pid_t pid;
- int st;
-
- rv = C_GetFunctionList (&proxy);
- assert (rv == CKR_OK);
-
- assert (p11_proxy_module_check (proxy));
-
- rv = proxy->C_Initialize(NULL);
- assert_num_eq (rv, CKR_OK);
-
- pid = fork ();
- if (!pid) {
- exit(0);
- }
- assert (pid != -1);
- waitpid(pid, &st, 0);
-
- rv = proxy->C_Finalize (NULL);
- assert_num_eq (rv, CKR_OK);
-
- p11_proxy_module_cleanup ();
-
- /* If the assertion fails, p11_kit_failed() doesn't return. So make
- * sure we do all the cleanup before the (expected) failure, or it
- * causes all the *later* tests to fail too! */
- if (!WIFEXITED (st) || WEXITSTATUS(st) != 0)
- assert_fail("Child failed to C_Initialize() and C_Finalize()", NULL);
-
-}
-
-static void
test_initialize_child (void)
{
CK_FUNCTION_LIST_PTR proxy;
@@ -286,7 +250,6 @@ main (int argc,
p11_test (test_initialize_finalize, "/proxy/initialize-finalize");
p11_test (test_initialize_multiple, "/proxy/initialize-multiple");
#ifndef _WIN32
- p11_test (test_deinit_after_fork, "/proxy/deinit-after-fork");
p11_test (test_initialize_child, "/proxy/initialize-child");
#endif