From: Daiki Ueno Date: Fri, 12 Aug 2016 12:27:46 +0000 (+0200) Subject: test: Make test-module work --without-trust-module X-Git-Tag: 0.23.3~40 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d74e29cf9733a405a0ea254a2d1edf236ae8735e;p=p11-kit test: Make test-module work --without-trust-module The test-module program currently depends on TRUST_PATHS, which is determined by the configure script and normally points to a resource outside of the build tree. To make the test system-independent, use a crafted path for testing. https://bugs.freedesktop.org/show_bug.cgi?id=89027 --- diff --git a/trust/test-module.c b/trust/test-module.c index b1ee5fd..1729b41 100644 --- a/trust/test-module.c +++ b/trust/test-module.c @@ -221,13 +221,14 @@ test_multi_initialize (void) rv = C_GetFunctionList (&module); assert_num_eq (rv, CKR_OK); + args.pReserved = "paths='" SYSCONFDIR "/trust/input'"; rv = module->C_Initialize (&args); assert_num_eq (rv, CKR_OK); count = 8; rv = module->C_GetSlotList (CK_TRUE, slots, &count); assert_num_eq (rv, CKR_OK); - assert_num_cmp (count, >, 0); + assert_num_cmp (count, ==, 1); rv = module->C_OpenSession (slots[0], CKF_SERIAL_SESSION, NULL, NULL, &session); assert_num_eq (rv, CKR_OK);