|
1 // |
|
2 // Copyright (c) 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 PRINT Running EMsvRemoveEntry |
|
18 |
|
19 //****************************************** |
|
20 // We should have ReadData capability to Read the Entry. |
|
21 // The SID when attempting to read the entry should be the same as that process which tried to add the entry. |
|
22 //****************************************** |
|
23 |
|
24 PRINT Running EMsvRemoveEntry : Caps = ReadWriteUserdata/WriteUserData. Same SID. Should Pass. |
|
25 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Setup.script |
|
26 |
|
27 |
|
28 RUN_PROGRAM -1 setcap c:\sys\bin\MessagingTestServer_caps.exe 0003fffe -SID 101F7776 C:\sys\bin\MessagingTestServer.exe |
|
29 |
|
30 RUN_PROGRAM -1 setcap c:\sys\bin\SendProxyServer_caps.exe 00018000 -SID 101F7776 C:\sys\bin\SendProxyServer.exe |
|
31 |
|
32 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CreateSingleEntryInbox.script |
|
33 |
|
34 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvRemoveEntry_Pass.script |
|
35 |
|
36 // Need delay to allow SendProxyServer shutting down |
|
37 DELAY 3000 |
|
38 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Restore.script |
|
39 |
|
40 //****************************************** |
|
41 // We do not have any ability to read from the inbox. |
|
42 // Since we own the entry, ie same SID, we should succeed. |
|
43 //****************************************** |
|
44 |
|
45 PRINT Running EMsvRemoveEntry : Read Caps = 0. Same SID. Should Pass. |
|
46 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Setup.script |
|
47 |
|
48 RUN_PROGRAM -1 setcap c:\sys\bin\MessagingTestServer_caps.exe 0003fffe -SID 101F7776 C:\sys\bin\MessagingTestServer.exe |
|
49 RUN_PROGRAM -1 setcap c:\sys\bin\SendProxyServer_caps.exe 00000000 -SID 101F7776 C:\sys\bin\SendProxyServer.exe |
|
50 |
|
51 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CreateSingleEntryInbox.script |
|
52 |
|
53 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvRemoveEntry_Pass.script |
|
54 |
|
55 // Need delay to allow SendProxyServer shutting down |
|
56 DELAY 3000 |
|
57 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Restore.script |
|
58 |
|
59 |
|
60 |
|
61 //****************************************** |
|
62 // We do not have any ability to read from the inbox. |
|
63 // Since we have ReadUserData/WriteUserData it should pass. |
|
64 //****************************************** |
|
65 |
|
66 PRINT Running EMsvRemoveEntry : Read Caps = WriteUserData. Different SID. Should Pass. |
|
67 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Setup.script |
|
68 |
|
69 RUN_PROGRAM -1 setcap c:\sys\bin\MessagingTestServer_caps.exe 0003fffe -SID 101F7776 C:\sys\bin\MessagingTestServer.exe |
|
70 |
|
71 RUN_PROGRAM -1 setcap c:\sys\bin\SendProxyServer_caps.exe 00018000 -SID 101F7777 C:\sys\bin\SendProxyServer.exe |
|
72 |
|
73 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CreateSingleEntryInbox.script |
|
74 |
|
75 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvRemoveEntry_Pass.script |
|
76 |
|
77 // Need delay to allow SendProxyServer shutting down |
|
78 DELAY 3000 |
|
79 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Restore.script |
|
80 |
|
81 |
|
82 |
|
83 //****************************************** |
|
84 // We do not have any ability to read from the inbox. |
|
85 // Since we have only WriteUserData it should fail. |
|
86 //****************************************** |
|
87 |
|
88 PRINT Running EMsvRemoveEntry : Read Caps = WriteUserData. Different SID. Should Fail. |
|
89 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Setup.script |
|
90 |
|
91 RUN_PROGRAM -1 setcap c:\sys\bin\MessagingTestServer_caps.exe 0003fffe -SID 101F7776 C:\sys\bin\MessagingTestServer.exe |
|
92 |
|
93 RUN_PROGRAM -1 setcap c:\sys\bin\SendProxyServer_caps.exe 00010000 -SID 101F7777 C:\sys\bin\SendProxyServer.exe |
|
94 |
|
95 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CreateSingleEntryInbox.script |
|
96 |
|
97 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvRemoveEntry_Fail.script |
|
98 |
|
99 // Need delay to allow SendProxyServer shutting down |
|
100 DELAY 3000 |
|
101 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Restore.script |
|
102 |
|
103 |
|
104 //****************************************** |
|
105 // We do not have any ability to read from the inbox. |
|
106 // Since we have only ReadUserData it should fail. |
|
107 //****************************************** |
|
108 |
|
109 PRINT Running EMsvRemoveEntry : Read Caps = ReadUserData. Different SID. Should Fail. |
|
110 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Setup.script |
|
111 |
|
112 RUN_PROGRAM -1 setcap c:\sys\bin\MessagingTestServer_caps.exe 0003fffe -SID 101F7776 C:\sys\bin\MessagingTestServer.exe |
|
113 |
|
114 RUN_PROGRAM -1 setcap c:\sys\bin\SendProxyServer_caps.exe 00008000 -SID 101F7777 C:\sys\bin\SendProxyServer.exe |
|
115 |
|
116 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CreateSingleEntryInbox.script |
|
117 |
|
118 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvRemoveEntry_Fail.script |
|
119 |
|
120 // Need delay to allow SendProxyServer shutting down |
|
121 DELAY 3000 |
|
122 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Restore.script |
|
123 |
|
124 |
|
125 //****************************************** |
|
126 // We do not have any ability to read from the inbox. |
|
127 // Since we have ReadUserData it should succeed. |
|
128 //****************************************** |
|
129 |
|
130 PRINT Running EMsvRemoveEntry : Read Caps = 0. Different SID. Should Fail |
|
131 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Setup.script |
|
132 |
|
133 RUN_PROGRAM -1 setcap c:\sys\bin\MessagingTestServer_caps.exe 0003fffe -SID 101F7776 C:\sys\bin\MessagingTestServer.exe |
|
134 |
|
135 RUN_PROGRAM -1 setcap c:\sys\bin\SendProxyServer_caps.exe 00000000 -SID 101F7777 C:\sys\bin\SendProxyServer.exe |
|
136 |
|
137 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_CreateSingleEntryInbox.script |
|
138 |
|
139 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvRemoveEntry_Fail.script |
|
140 |
|
141 DELAY 3000 |
|
142 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Restore.script |