|
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 EMsvCloseServer |
|
18 |
|
19 //****************************************** |
|
20 // We should have WriteDeviceData in order to close the server |
|
21 // SID should be irrelevant. |
|
22 //****************************************** |
|
23 |
|
24 PRINT Running EMsvCloseServer : Read Caps = WriteDeviceData. Same SID. Should Pass. |
|
25 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Setup.script |
|
26 |
|
27 RUN_PROGRAM -1 setcap c:\sys\bin\MessagingTestServer_caps.exe 0003fffe -SID 101F7774 C:\sys\bin\MessagingTestServer.exe |
|
28 |
|
29 RUN_PROGRAM -1 setcap c:\sys\bin\SendProxyServer_caps.exe 00000020 -SID 101F7774 C:\sys\bin\SendProxyServer.exe |
|
30 |
|
31 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvCloseServer_Pass.script |
|
32 |
|
33 // Need delay to allow SendProxyServer shutting down |
|
34 DELAY 3000 |
|
35 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Restore.script |
|
36 |
|
37 //****************************************** |
|
38 // We should have WriteDeviceData in order to close the server, we do not should fail. |
|
39 // The SID when attempting to close the server the process should have the same SID of that which started the server |
|
40 //****************************************** |
|
41 |
|
42 PRINT Running EMsvCloseServer : Read Caps = 0. Same SID. Should Fail. |
|
43 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Setup.script |
|
44 |
|
45 RUN_PROGRAM -1 setcap c:\sys\bin\MessagingTestServer_caps.exe 00000000 -SID 101F7774 C:\sys\bin\MessagingTestServer.exe |
|
46 |
|
47 RUN_PROGRAM -1 setcap c:\sys\bin\SendProxyServer_caps.exe 00000000 -SID 101F7774 C:\sys\bin\SendProxyServer.exe |
|
48 |
|
49 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvCloseServer_Fail.script |
|
50 |
|
51 // Need delay to allow SendProxyServer shutting down |
|
52 DELAY 3000 |
|
53 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Restore.script |
|
54 |
|
55 //****************************************** |
|
56 // We should have WriteDeviceData in order to close the server. |
|
57 // SID should not matter. |
|
58 //****************************************** |
|
59 |
|
60 PRINT Running EMsvCloseServer : Read Caps = WriteDeviceData. Different SID. Should Pass. |
|
61 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Setup.script |
|
62 |
|
63 RUN_PROGRAM -1 setcap c:\sys\bin\MessagingTestServer_caps.exe 0003fffe -SID 101F7774 C:\sys\bin\MessagingTestServer.exe |
|
64 |
|
65 RUN_PROGRAM -1 setcap c:\sys\bin\SendProxyServer_caps.exe 00000020 -SID 101F7775 C:\sys\bin\SendProxyServer.exe |
|
66 |
|
67 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvCloseServer_Pass.script |
|
68 |
|
69 // Need delay to allow SendProxyServer shutting down |
|
70 DELAY 3000 |
|
71 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Restore.script |
|
72 |
|
73 //****************************************** |
|
74 // We should have WriteDeviceData in order to close the server. So should fail. |
|
75 // SID should be irrelevant. |
|
76 //****************************************** |
|
77 |
|
78 PRINT Running EMsvCloseServer : Read Caps = 0. Different SID. Should Fail. |
|
79 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Setup.script |
|
80 |
|
81 RUN_PROGRAM -1 setcap c:\sys\bin\MessagingTestServer_caps.exe 0003fffe -SID 101F7774 C:\sys\bin\MessagingTestServer.exe |
|
82 |
|
83 RUN_PROGRAM -1 setcap c:\sys\bin\SendProxyServer_caps.exe 00000000 -SID 101F7775 C:\sys\bin\SendProxyServer.exe |
|
84 |
|
85 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_SendEMsvCloseServer_Fail.script |
|
86 DELAY 3000 |
|
87 RUN_SCRIPT c:\msgtest\TestFramework\ScriptedTestCases\Capabilities\Cap_Restore.script |