]>
Commit | Line | Data |
---|---|---|
d8f41ccd A |
1 | /* |
2 | * Test parameters shared by all tests in threadTest suite. | |
3 | */ | |
4 | ||
5 | #ifndef _TEST_PARAMS_H_ | |
6 | #define _TEST_PARAMS_H_ | |
7 | ||
8 | #ifdef __cplusplus | |
9 | extern "C" { | |
10 | #endif | |
11 | ||
12 | #include <Security/cssmtype.h> | |
13 | ||
14 | typedef struct { | |
15 | unsigned numLoops; | |
16 | char verbose; | |
17 | char quiet; | |
18 | unsigned threadNum; | |
19 | unsigned testNum; | |
20 | char progressChar; | |
21 | CSSM_CSP_HANDLE cspHand; | |
22 | CSSM_CL_HANDLE clHand; | |
23 | CSSM_TP_HANDLE tpHand; | |
24 | char *testOpts; // test-specific command line options | |
25 | void *perThread; // test-specific per-thread info, e.g., | |
26 | // an array of CSSM_KEYs | |
27 | } TestParams; | |
28 | ||
29 | /* individual tests and their per-thread init routines */ | |
30 | extern int cgConstructInit(TestParams *testParams); | |
31 | extern int cgConstruct(TestParams *testParams); | |
32 | extern int cgVerifyInit(TestParams *testParams); | |
33 | extern int cgVerify(TestParams *testParams); | |
34 | extern int sslPingInit(TestParams *testParams); | |
35 | extern int sslPing(TestParams *testParams); | |
36 | extern int getFieldsInit(TestParams *testParams); | |
37 | extern int getFields(TestParams *testParams); | |
38 | extern int getCachedFieldsInit(TestParams *testParams); | |
39 | extern int getCachedFields(TestParams *testParams); | |
40 | extern int timeInit(TestParams *testParams); | |
41 | extern int timeThread(TestParams *testParams); | |
42 | extern int signVerifyInit(TestParams *testParams); | |
43 | extern int signVerify(TestParams *testParams); | |
44 | extern int symTestInit(TestParams *testParams); | |
45 | extern int symTest(TestParams *testParams); | |
46 | extern int attachTestInit(TestParams *testParams); | |
47 | extern int attachTest(TestParams *testParams); | |
48 | extern int rsaSignInit(TestParams *testParams); | |
49 | extern int rsaSignTest(TestParams *testParams); | |
50 | extern int desInit(TestParams *testParams); | |
51 | extern int desTest(TestParams *testParams); | |
52 | extern int sslThrashInit(TestParams *testParams); | |
53 | extern int sslThrash(TestParams *testParams); | |
54 | extern int cspRandInit(TestParams *testParams); | |
55 | extern int cspRand(TestParams *testParams); | |
56 | extern int derDecodeInit(TestParams *testParams); | |
57 | extern int derDecodeTest(TestParams *testParams); | |
58 | extern int secTrustEvalInit(TestParams *testParams); | |
59 | extern int secTrustEval(TestParams *testParams); | |
60 | extern int kcStatusInit(TestParams *testParams); | |
61 | extern int kcStatus(TestParams *testParams); | |
62 | extern int digestClientInit(TestParams *testParams); | |
63 | extern int digestClient(TestParams *testParams); | |
64 | extern int mdsLookupInit(TestParams *testParams); | |
65 | extern int mdsLookup(TestParams *testParams); | |
66 | extern int cssmErrStrInit(TestParams *testParams); | |
67 | extern int cssmErrStr(TestParams *testParams); | |
68 | extern int trustSettingsInit(TestParams *testParams); | |
69 | extern int trustSettingsEval(TestParams *testParams); | |
70 | extern int dbOpenCloseInit(TestParams *testParams); | |
71 | extern int dbOpenCloseEval(TestParams *testParams); | |
72 | extern int copyRootsInit(TestParams *testParams); | |
73 | extern int copyRootsTest(TestParams *testParams); | |
74 | ||
75 | /* etc. */ | |
76 | ||
77 | /* common thread-safe routines in threadTest.cpp */ | |
78 | CSSM_RETURN threadGetRandData( | |
79 | const TestParams *testParams, | |
80 | CSSM_DATA_PTR data, // mallocd by caller | |
81 | unsigned numBytes); // how much to fill | |
82 | void randomDelay(); | |
83 | void printChar( | |
84 | char c); | |
85 | ||
86 | #ifdef __cplusplus | |
87 | } | |
88 | #endif | |
89 | ||
90 | #endif /* _TEST_PARAMS_H_ */ |