summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaiki Ueno <dueno@redhat.com>2016-08-12 14:27:46 +0200
committerStef Walter <stefw@redhat.com>2016-09-04 15:54:24 +0200
commitd74e29cf9733a405a0ea254a2d1edf236ae8735e (patch)
tree9112234d8bbfd324f574deb8400dc156bdd4ddb0
parent927c8e98f159607acf7fa8b0f5bcf9a4d0497742 (diff)
downloadp11-kit-d74e29cf9733a405a0ea254a2d1edf236ae8735e.tar.gz
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
-rw-r--r--trust/test-module.c3
1 files changed, 2 insertions, 1 deletions
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);