summaryrefslogtreecommitdiff
path: root/p11-kit/tests/test-init.c
diff options
context:
space:
mode:
authorStef Walter <stefw@gnome.org>2013-02-19 13:51:32 +0100
committerStef Walter <stefw@gnome.org>2013-05-21 10:47:53 +0200
commita14ff781ebf231daa99990fd65c2312f26db93a8 (patch)
treedbac181a2243c92f72c1b84a6306517969590e09 /p11-kit/tests/test-init.c
parent0cb1132469c1e13be64f85cd6566e6617bfe32cc (diff)
Manage C_CloseAllSessions function for multiple callers
Make C_CloseAllSessions work for different callers. Track the sessions that each caller opens and close just those when C_CloseAllSessiosn is called.
Diffstat (limited to 'p11-kit/tests/test-init.c')
-rw-r--r--p11-kit/tests/test-init.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/p11-kit/tests/test-init.c b/p11-kit/tests/test-init.c
index f2347c8..dbeab46 100644
--- a/p11-kit/tests/test-init.c
+++ b/p11-kit/tests/test-init.c
@@ -152,7 +152,14 @@ test_recursive_initialization (CuTest *tc)
p11_unlock ();
rv = p11_kit_module_initialize (recursive_managed);
- CuAssertTrue (tc, rv == CKR_FUNCTION_FAILED);
+ CuAssertIntEquals (tc, CKR_FUNCTION_FAILED, rv);
+
+ p11_lock ();
+
+ rv = p11_module_release_inlock_reentrant (recursive_managed);
+ CuAssertTrue (tc, rv == CKR_OK);
+
+ p11_unlock ();
p11_kit_be_loud ();
}