Blame testcases/misc_tests/README

Packit 8681c6
Miscellaneous tests
Packit 8681c6
Packit 8681c6
obj_mgmt_tests
Packit 8681c6
	This testsuite performs various object management tasks.
Packit 8681c6
Packit 8681c6
	The do_CreateTokenObjects() and do_HWFeatureSearch() functions
Packit 8681c6
	create token objects and by default or skipped.
Packit 8681c6
	To include these two functions, use the "-noskip" option when issuing
Packit 8681c6
	the tests.
Packit 8681c6
Packit 8681c6
spinlock_tests.sh
Packit 8681c6
	Tests the two spinlocks: /var/lock/LCK..opencryptoki which is used 
Packit 8681c6
	when accessing shared memory for pkcsslotd and pkcs#11 api calls.
Packit 8681c6
	And /var/lock/LOCK..opencryptoki_stdll which is used when accessing
Packit 8681c6
	global shared memory in the STDLLs.
Packit 8681c6
Packit 8681c6
	The file, spinlock_tests.sh is a bash script that creates a
Packit 8681c6
	number of child processes. Each child process runs spinlock_child.sh 
Packit 8681c6
	script.
Packit 8681c6
Packit 8681c6
	Quick Start Info:
Packit 8681c6
Packit 8681c6
	Execute testcase by, 
Packit 8681c6
		spinlock_tests.sh -p <num> -l <num> -s <slotid>
Packit 8681c6
		p: the amount of child processes to create
Packit 8681c6
		l: the number of times each child process executes 
Packit 8681c6
		   obj_mgmt_lock_tests
Packit 8681c6
		s: the slot to test
Packit 8681c6
Packit 8681c6
	For example, 
Packit 8681c6
		spinlock_tests.sh -p 15 -l 5 -s 1
Packit 8681c6
Packit 8681c6
	Additional Info:
Packit 8681c6
Packit 8681c6
	obj_mgmt_lock_tests
Packit 8681c6
	spinlock_child.sh
Packit 8681c6
Packit 8681c6
	The file, spinlock_tests.sh is a bash script that creates a
Packit 8681c6
	number of child processes. Each child process runs spinlock_child.sh 
Packit 8681c6
	script.
Packit 8681c6
Packit 8681c6
	The file, spinlock_child.sh is a bash script that executes
Packit 8681c6
	obj_mgmt_lock_tests a number of times.
Packit 8681c6
Packit 8681c6
	obj_mgmt_lock_tests was derived from obj_mgmt.c.
Packit 8681c6
	It contains several api calls that will want to acquire the various
Packit 8681c6
	spinlocks.
Packit 8681c6
Packit 8681c6
	Usage: spinlock_child.sh -l <count> -s <slotid>
Packit 8681c6
        l: the number of times each child process executes obj_mgmt_lock_tests
Packit 8681c6
        s: the slot to test
Packit 8681c6
Packit 8681c6
	Usage: obj_mgmt_lock_tests -slot <slotid>
Packit 8681c6
Packit 8681c6
threadmkobj
Packit 8681c6
	TODO: To be tested.
Packit 8681c6
Packit 8681c6
speed	
Packit 8681c6
	TODO: To be tested.
Packit 8681c6
	The speed program is a performance oriented test program. It times
Packit 8681c6
	certain operations over multiple runs, and gives min, max, and average
Packit 8681c6
	times for these operations. Performace tests are run for: 2048 bit
Packit 8681c6
	RSA keygen, 10½4 bit RSA keygen, 1024 bit RSA signature generate,
Packit 8681c6
	1024 bit RSA signature verify, triple DES encrypt/decrypt on a
Packit 8681c6
	10K message, and SHA1 on a 10K message.
Packit 8681c6
Packit 8681c6
tok_obj
Packit 8681c6
	TODO: To be tested.
Packit 8681c6
	This program is used to test object creation and modification.
Packit 8681c6
	The token does not need to be intitialized to use this application.
Packit 8681c6
	When run, a user is presented with a menu. From there, the user
Packit 8681c6
	must initialize the token and set the user PIN if this has not been
Packit 8681c6
	done previously. The menu choice for setting the user PIN sets it
Packit 8681c6
	to "12345678".
Packit 8681c6
Packit 8681c6
tok_des
Packit 8681c6
	TODO: To be tested.
Packit 8681c6
Packit 8681c6
tok_rsa
Packit 8681c6
	TODO: To be tested.
Packit 8681c6
Packit 8681c6
fork
Packit 8681c6
	This testcase forks off a client process in various situations, e.g
Packit 8681c6
	before and after initialization, before and after session creation,
Packit 8681c6
	and ensures that the forked client process finds an uninitialized
Packit 8681c6
	Opencryptoki environment and does not have access to any of the
Packit 8681c6
	parent's sessions or objects. Also the parents sessions and objects
Packit 8681c6
	must still be available and functional in the parent process after the 
Packit 8681c6
	fork.
Packit 8681c6
Packit 8681c6
	As per PKCS#11 standard, a forked child process is no PKCS#11 
Packit 8681c6
	application after the fork, and must initialize Opencryptoki using
Packit 8681c6
	C_Initialize() in order to use Opencryptoki.
Packit 8681c6
Packit 8681c6
	Usage: fork -slot <slotid>
Packit 8681c6
Packit 8681c6
multi_instance
Packit 8681c6
	This testcase open sessions on two different tokens within one process.
Packit 8681c6
	It ensures that both tokens operate independently, and that sessions of
Packit 8681c6
	objects opened with one token can not be used with the other one.
Packit 8681c6
Packit 8681c6
	To test multi-instance support of a token, the Opencryptoi configuration
Packit 8681c6
	must be set up that way that 2 tokens of the same type (e.g. 2 EP11
Packit 8681c6
	tokens) exist.
Packit 8681c6
Packit 8681c6
	Usage: multi_instance -slot1 <slotid1> -slot2 <slotid2>
Packit Service 8aa27d
Packit Service 8aa27d
tok2tok_transport
Packit Service 8aa27d
	This testcase open sessions on two different tokens within one process.
Packit Service 8aa27d
	It then generates a keys in the first token, and transports them via
Packit Service 8aa27d
	various Wrap/Unwrap mechanisms to the other token. It is checked that
Packit Service 8aa27d
	the transported key can still be used in the receiving token. 
Packit Service 8aa27d
Packit Service 8aa27d
	Usage: tok2tok_transport -slot1 <slotid1> -slot2 <slotid2>