|
1 /* |
|
2 * Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __TESTDB_BLR_H__ |
|
21 #define __TESTDB_BLR_H__ |
|
22 |
|
23 #include <test/testexecutestepbase.h> |
|
24 #include <time.h> |
|
25 #include <pthread.h> |
|
26 #include <stdio.h> |
|
27 #include <stdlib.h> |
|
28 #include <string.h> |
|
29 #include <pthread.h> |
|
30 #include <semaphore.h> |
|
31 #include <errno.h> |
|
32 #include <sys/time.h> |
|
33 #include <e32math.h> |
|
34 #include <grp.h> |
|
35 #include <pwd.h> |
|
36 |
|
37 _LIT(Kgetgrgid_pos, "getgrgid_pos"); |
|
38 _LIT(Kgetgrgid_neg, "getgrgid_neg"); |
|
39 _LIT(Kgetgrnam_pos, "getgrnam_pos"); |
|
40 _LIT(Kgetgrnam_neg, "getgrnam_neg"); |
|
41 _LIT(Kgetgrgid_r_pos, "getgrgid_r_pos"); |
|
42 _LIT(Kgetgrgid_r_neg, "getgrgid_r_neg"); |
|
43 _LIT(Kgetgrnam_r_pos, "getgrnam_r_pos"); |
|
44 _LIT(Kgetgrnam_r_neg, "getgrnam_r_neg"); |
|
45 _LIT(Kgetgrent_combined, "getgrent_combined"); |
|
46 _LIT(Ksetgrent_combined1, "setgrent_combined1"); |
|
47 |
|
48 _LIT(Kgetpwuid_pos, "getpwuid_pos"); |
|
49 _LIT(Kgetpwnam_pos, "getpwnam_pos"); |
|
50 _LIT(Kgetpwuid_neg, "getpwuid_neg"); |
|
51 _LIT(Kgetpwnam_neg, "getpwnam_neg"); |
|
52 _LIT(Kgetpwuid_r_pos, "getpwuid_r_pos"); |
|
53 _LIT(Kgetpwnam_r_pos, "getpwnam_r_pos"); |
|
54 _LIT(Kgetpwuid_r_neg, "getpwuid_r_neg"); |
|
55 _LIT(Kgetpwnam_r_neg, "getpwnam_r_neg"); |
|
56 |
|
57 _LIT(Kendgrent_test1, "endgrent_test1"); |
|
58 _LIT(Kgetpwent_test1, "getpwent_test1"); |
|
59 _LIT(Ksetpwent_test1, "setpwent_test1"); |
|
60 _LIT(Kendpwent_test1, "endpwent_test1"); |
|
61 class CTestDbBlr : public CTestStep |
|
62 { |
|
63 public: |
|
64 ~CTestDbBlr(); |
|
65 CTestDbBlr(const TDesC& aStepName); |
|
66 TVerdict doTestStepL(); |
|
67 TVerdict doTestStepPreambleL(); |
|
68 TVerdict doTestStepPostambleL(); |
|
69 private: |
|
70 |
|
71 // Utility functions for handling parameters etc. |
|
72 void ReadIntParam(TInt &aInt); |
|
73 void ReadStringParam(char* aString); |
|
74 TBool SameString(char *aString1, char *aString2); |
|
75 void StringToDes(char* aString, TDes &aDescriptor); |
|
76 void RandomizeString(char* aString, TInt aLength); |
|
77 TInt RandomInt(TInt aMaxValue); |
|
78 |
|
79 //Test methods |
|
80 TInt getgrgid_pos(); |
|
81 TInt getgrgid_neg(); |
|
82 TInt getgrnam_pos(); |
|
83 TInt getgrnam_neg(); |
|
84 TInt getgrgid_r_pos(); |
|
85 TInt getgrgid_r_neg(); |
|
86 TInt getgrnam_r_pos(); |
|
87 TInt getgrnam_r_neg(); |
|
88 TInt getgrent_combined(); |
|
89 TInt setgrent_combined1(); |
|
90 |
|
91 TInt getpwuid_pos(); |
|
92 TInt getpwnam_pos(); |
|
93 TInt getpwuid_neg(); |
|
94 TInt getpwnam_neg(); |
|
95 TInt getpwuid_r_pos(); |
|
96 TInt getpwnam_r_pos(); |
|
97 TInt getpwuid_r_neg(); |
|
98 TInt getpwnam_r_neg(); |
|
99 |
|
100 |
|
101 TInt endgrent_test1(); |
|
102 TInt getpwent_test1(); |
|
103 TInt setpwent_test1(); |
|
104 TInt endpwent_test1(); |
|
105 |
|
106 private: //data |
|
107 //Input param cnt |
|
108 TInt iParamCnt; |
|
109 // Randomizer seed |
|
110 TInt64 iRandomizerSeed; |
|
111 }; |
|
112 #endif |