equal
deleted
inserted
replaced
24 #define __E32TEST_EXTENSION__ |
24 #define __E32TEST_EXTENSION__ |
25 #include <e32test.h> |
25 #include <e32test.h> |
26 #include <hal.h> |
26 #include <hal.h> |
27 #include <e32math.h> |
27 #include <e32math.h> |
28 #include "d_entropysources.h" |
28 #include "d_entropysources.h" |
|
29 #include "testexclusions.h" |
29 |
30 |
30 //--------------------------------------------------------------------------------------------------------------------- |
31 //--------------------------------------------------------------------------------------------------------------------- |
31 //! @SYMTestCaseID KBASE-entropysources-2703 |
32 //! @SYMTestCaseID KBASE-entropysources-2703 |
32 //! @SYMTestType UT |
33 //! @SYMTestType UT |
33 //! @SYMTestCaseDesc Verifies that entropy is contributed to the Secure RNG |
34 //! @SYMTestCaseDesc Verifies that entropy is contributed to the Secure RNG |
96 } |
97 } |
97 |
98 |
98 LOCAL_C TBool HardwareRNGPresent() |
99 LOCAL_C TBool HardwareRNGPresent() |
99 { |
100 { |
100 TInt muid = 0; |
101 TInt muid = 0; |
101 const TInt r = HAL::Get(HAL::EMachineUid, muid); |
102 |
102 if (r != KErrNone) return EFalse;; |
103 TInt r = HAL::Get(HAL::EMachineUid, muid); |
103 return ((muid != HAL::EMachineUid_X86PC) && |
104 if (r != KErrNone) |
104 (muid != HAL::EMachineUid_NE1_TB) && |
105 { |
105 (muid != HAL::EMachineUid_OmapH6) && |
106 return EFalse; |
106 (muid != HAL::EMachineUid_OmapZoom) && |
107 } |
107 (muid != HAL::EMachineUid_Win32Emulator)); |
108 |
|
109 if ((muid == HAL::EMachineUid_X86PC) || |
|
110 (muid == HAL::EMachineUid_NE1_TB) || |
|
111 (muid == HAL::EMachineUid_OmapH6) || |
|
112 (muid == HAL::EMachineUid_OmapZoom) || |
|
113 (muid == HAL::EMachineUid_Win32Emulator)) |
|
114 { |
|
115 return EFalse; |
|
116 } |
|
117 |
|
118 TInt testExclusions = 0; |
|
119 |
|
120 r = GetTestExclusionSettings(testExclusions); |
|
121 if (r != KErrNone) |
|
122 { |
|
123 return EFalse; |
|
124 } |
|
125 |
|
126 if (testExclusions & KDisableEntropySourceCheck) |
|
127 { |
|
128 return EFalse; |
|
129 } |
|
130 |
|
131 return ETrue; |
108 } |
132 } |
109 |
133 |
110 GLDEF_C TInt E32Main() |
134 GLDEF_C TInt E32Main() |
111 { |
135 { |
112 test.Title(); |
136 test.Title(); |