summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2008-12-04 22:53:12 +0000
committerStef Walter <stef@memberwebs.com>2008-12-04 22:53:12 +0000
commit91d28a736abc1e1cd04b453f5c16f343feb91a3d (patch)
tree15c11ab70081c71a09baa36a0fe0f2eeb7fc6deb
parent96cae9cf6af1356d1ed24fd9e21530cfa9ac85ee (diff)
Add coverage generation into make file.
-rw-r--r--Makefile.am4
-rw-r--r--configure.in6
-rw-r--r--doc/Makefile.am7
-rw-r--r--doc/pkcs11-coverage.txt65
4 files changed, 59 insertions, 23 deletions
diff --git a/Makefile.am b/Makefile.am
index 479e90a..7452b7b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-EXTRA_DIST = BUGS
-SUBDIRS = src
+# EXTRA_DIST = BUGS
+SUBDIRS = src doc
diff --git a/configure.in b/configure.in
index ef2fe4d..f046226 100644
--- a/configure.in
+++ b/configure.in
@@ -11,6 +11,10 @@ AC_PROG_INSTALL
CFLAGS="$CFLAGS -g -O0 -Wall"
-AC_CONFIG_FILES([Makefile src/Makefile])
+AC_CONFIG_FILES([
+Makefile
+doc/Makefile
+src/Makefile
+])
AC_OUTPUT
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644
index 0000000..55ef7cb
--- /dev/null
+++ b/doc/Makefile.am
@@ -0,0 +1,7 @@
+
+EXTRA_DIST = \
+ pkcs11-coverage.py \
+ pkcs11-coverage.txt
+
+coverage:
+ python pkcs11-coverage.py > pkcs11-coverage.txt
diff --git a/doc/pkcs11-coverage.txt b/doc/pkcs11-coverage.txt
index 39aa5dc..692af76 100644
--- a/doc/pkcs11-coverage.txt
+++ b/doc/pkcs11-coverage.txt
@@ -1,30 +1,55 @@
-C_Initialize
- -
- - Checks various locking styles.
- - Checks double initialization.
- - Various mutex functions have checks.
-C_Finalize
- - Checks double calls.
+PKCS#11 COVERAGE
-C_GetInfo
- - Checks NULL argument.
- - Space padding in CK_INFO strings.
- - Cryptoki version matches that in CK_FUNCTION_LIST table.
- -
+This is the test coverage of the p11-tests tool of the PKCS#11 interface.
+We're anxious to complete this, if you have patches please do contribute.
+
+
+C_Finalize
+- Normal call
+- Double finalize in a row
C_GetFunctionList
- - Checks NULL arguments.
- - Checks that results match library exported C_GetFunctionList.
+- See if returns same data as library entry point
-C_GetSlotList
- - Calling with NULL arguments.
- - Calling with extra memory.
- - Calling with too little memory.
+C_GetInfo
+- NULL argument
+- Normal call
+- Cryptoki version matches that in library entry point data
+- Space padded strings in CK_INFO
+- No flags set
C_GetSlotInfo
- - Calling with NULL arguments.
- - Padding
+- NULL argument
+- Normal call
+- Space padded CK_SLOT_INFO fields
+- CK_SLOT_INFO flags are from valid set
+- Track CKF_TOKEN_PRESENT flag and compare to C_GetSlotList(TRUE)
+C_GetSlotList
+- NULL arguments
+- Retrieving the count
+- Passing buffer space along with zero count.
+- Passing buffer space along with low count.
+- Passing too much buffer space.
+
+C_GetTokenInfo
+- Null arguments
+- Normal call
+- Space padded CK_TOKEN_INFO fields
+- CK_TOKEN_INFO flags are from valid set
+- Validate token time when CKF_CLOCK_ON_TOKEN
+- Calling on slot without token
+
+C_Initialize
+- Normal call
+- Locking: no threads
+- Locking: os locking
+- Locking: app locking
+- Locking: either locking
+- Calls without initializing
+- NULL argument
+- Multiple initialize with C_Finalize between
+- Double initialize in a row