author | William Roberts <williamr@symbian.org> |
Fri, 23 Jul 2010 10:28:58 +0100 | |
changeset 224 | da1922ac85fb |
parent 102 | ef2a444a7410 |
child 231 | 75252ea6123b |
permissions | -rw-r--r-- |
0 | 1 |
// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 |
// All rights reserved. |
|
3 |
// This component and the accompanying materials are made available |
|
4 |
// under the terms of the License "Eclipse Public License v1.0" |
|
5 |
// which accompanies this distribution, and is available |
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 |
// |
|
8 |
// Initial Contributors: |
|
9 |
// Nokia Corporation - initial contribution. |
|
10 |
// |
|
11 |
// Contributors: |
|
12 |
// |
|
13 |
// Description: |
|
14 |
// e32test\pccd\t_medch.cpp |
|
15 |
// Continuously generate media changes followesd by a remount of the peripheral bus controller. |
|
16 |
// |
|
17 |
// |
|
18 |
||
19 |
#define __E32TEST_EXTENSION__ |
|
20 |
#include <e32test.h> |
|
21 |
#include <e32svr.h> |
|
22 |
#include <hal.h> |
|
23 |
#include "d_medch.h" |
|
24 |
||
25 |
//#define __SOAK_TEST__ // Define to run until a key is pressed (Automatic tests only) |
|
26 |
//#define __MANUAL_TEST__ // Define to allow manual control of the door/media |
|
27 |
//#define __DEVICE_HAS_NO_DOOR__ // Define for devices that have no door (Manual tests only) |
|
28 |
||
29 |
#if defined(__MANUAL_TEST__) && defined(__WINS__) |
|
30 |
#define __DEVICE_HAS_NO_DOOR__ |
|
31 |
#endif |
|
32 |
||
33 |
#if !defined(__MANUAL_TEST__) && defined(__DEVICE_HAS_NO_DOOR__) |
|
34 |
#undef __DEVICE_HAS_NO_DOOR__ |
|
35 |
#endif |
|
36 |
||
37 |
#if defined(__MANUAL_TEST__) && defined(__SOAK_TEST__) |
|
38 |
#undef __SOAK_TEST__ |
|
39 |
#endif |
|
40 |
||
41 |
#ifndef __SOAK_TEST__ |
|
42 |
#ifdef __WINS__ |
|
43 |
const TInt KMaxTestTime = 5000000; // Run the test for 5 seconds on emulator |
|
44 |
#else |
|
45 |
const TInt KMaxTestTime = 10000000; // Run the test for 10 seconds on target |
|
46 |
#endif |
|
47 |
#endif |
|
48 |
||
49 |
#define MMC_PDD_NAME _L("MEDMMC") |
|
50 |
||
51 |
const TInt KPowerUpTimeOut = 5000000; // Give the card 5 seconds to power up |
|
52 |
||
102
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
53 |
const TUint KDriveAttMask = KDriveAttLocal | KDriveAttRom | KDriveAttRemote; |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
54 |
const TUint KMediaAttMask = KMediaAttVariableSize | KMediaAttDualDensity | KMediaAttLockable | KMediaAttLocked | KMediaAttHasPassword | KMediaAttReadWhileWrite; |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
55 |
|
0 | 56 |
LOCAL_D RTest test(_L("Media change test")); |
57 |
||
58 |
LOCAL_D TBusLocalDrive TheDrive; |
|
59 |
LOCAL_D RMedCh TheMediaChange; |
|
60 |
LOCAL_D TRequestStatus TheMediaStatus; |
|
61 |
LOCAL_D TBool TheChangedFlag; |
|
62 |
||
102
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
63 |
LOCAL_C TInt FindDataPagingDrive() |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
64 |
/** |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
65 |
Find the drive containing the swap partition. |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
66 |
|
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
67 |
@return Local drive identifier or KErrNotFound if not found |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
68 |
*/ |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
69 |
{ |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
70 |
TInt drive = KErrNotFound; |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
71 |
|
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
72 |
RLocalDrive d; |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
73 |
TBool change = EFalse; |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
74 |
TLocalDriveCapsV5 driveCaps; |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
75 |
TPckg<TLocalDriveCapsV5> capsPack(driveCaps); |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
76 |
|
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
77 |
for(TInt i = 0; i < KMaxLocalDrives && drive < 0; ++i) |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
78 |
{ |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
79 |
if(d.Connect(i, change) == KErrNone) |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
80 |
{ |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
81 |
if(d.Caps(capsPack) == KErrNone) |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
82 |
{ |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
83 |
if ((driveCaps.iMediaAtt & KMediaAttPageable) && |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
84 |
(driveCaps.iPartitionType == KPartitionTypePagedData)) |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
85 |
{ |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
86 |
drive = i; |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
87 |
} |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
88 |
} |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
89 |
d.Close(); |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
90 |
} |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
91 |
} |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
92 |
|
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
93 |
if(drive == KErrNotFound) |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
94 |
{ |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
95 |
test.Printf(_L("No data paging drive found\n")); |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
96 |
} |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
97 |
|
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
98 |
return drive; |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
99 |
} |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
100 |
|
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
101 |
LOCAL_C TInt DataPagingMediaCaps(TLocalDriveCapsV5 &aCaps) |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
102 |
/** |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
103 |
Return the caps of the media containing a swap partition. |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
104 |
|
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
105 |
@return Error code, on success aCaps contains the capabilities of the paging drive |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
106 |
*/ |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
107 |
{ |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
108 |
TInt dataPagingDrive = FindDataPagingDrive(); |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
109 |
|
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
110 |
if (dataPagingDrive == KErrNotFound) |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
111 |
{ |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
112 |
return KErrNotFound; |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
113 |
} |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
114 |
|
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
115 |
RLocalDrive dpDrive; |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
116 |
TBool change = EFalse; |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
117 |
|
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
118 |
TInt r = dpDrive.Connect(dataPagingDrive, change); |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
119 |
test(r == KErrNone); |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
120 |
|
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
121 |
TLocalDriveCapsV5 dpDriveCaps; |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
122 |
TPckg<TLocalDriveCapsV5> capsPack(dpDriveCaps); |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
123 |
r = dpDrive.Caps(capsPack); |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
124 |
test(r == KErrNone); |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
125 |
|
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
126 |
if((dpDriveCaps.iDriveAtt & KDriveAttHidden) == 0) |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
127 |
{ |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
128 |
test.Printf(_L("Paging partition is not hidden! Assuming it is correct anyway!\n")); |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
129 |
} |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
130 |
|
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
131 |
aCaps = dpDriveCaps; |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
132 |
|
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
133 |
return KErrNone; |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
134 |
} |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
135 |
|
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
136 |
LOCAL_C TBool IsDriveOnPagingMedia(TInt aDrive, TLocalDriveCapsV5 &aPagingMediaCaps) |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
137 |
/** |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
138 |
Determines whether a drive is on the same media as the paging media by comparing |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
139 |
media characteristics |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
140 |
|
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
141 |
@return ETrue if (likely) to be on the same media, EFalse if not. |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
142 |
*/ { |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
143 |
RLocalDrive drive; |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
144 |
TBool change = EFalse; |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
145 |
|
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
146 |
TInt r = drive.Connect(aDrive, change); |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
147 |
test(r == KErrNone); |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
148 |
|
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
149 |
TLocalDriveCapsV5 driveCaps; |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
150 |
TPckg<TLocalDriveCapsV5> capsPack(driveCaps); |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
151 |
r = drive.Caps(capsPack); |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
152 |
test(r == KErrNone); |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
153 |
|
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
154 |
// Check media serial number |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
155 |
if(aPagingMediaCaps.iSerialNumLength > 0) |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
156 |
{ |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
157 |
if((driveCaps.iSerialNumLength > 0) && |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
158 |
((memcompare(driveCaps.iSerialNum, driveCaps.iSerialNumLength, |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
159 |
aPagingMediaCaps.iSerialNum, aPagingMediaCaps.iSerialNumLength)) == 0)) |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
160 |
{ |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
161 |
// serial numbers equal, so drive in question is on same media as paging drive |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
162 |
test.Printf(_L("Based on serial number match, drive %d shares the same media as paging drive\n"), aDrive); |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
163 |
return ETrue; |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
164 |
} |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
165 |
} |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
166 |
else |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
167 |
{ |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
168 |
// Turn off bits which may be different |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
169 |
aPagingMediaCaps.iDriveAtt &= KDriveAttMask; |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
170 |
aPagingMediaCaps.iMediaAtt &= KMediaAttMask; |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
171 |
driveCaps.iDriveAtt &= KDriveAttMask; |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
172 |
driveCaps.iMediaAtt &= KMediaAttMask; |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
173 |
|
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
174 |
if ((driveCaps.iType == aPagingMediaCaps.iType) && |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
175 |
(driveCaps.iDriveAtt == aPagingMediaCaps.iDriveAtt) && |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
176 |
(driveCaps.iMediaAtt == aPagingMediaCaps.iMediaAtt)) |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
177 |
{ |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
178 |
test.Printf(_L("Based on media characteristics match, drive %d shares the same media as paging drive\n"), aDrive); |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
179 |
return ETrue; |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
180 |
} |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
181 |
} |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
182 |
|
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
183 |
return EFalse; |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
184 |
} |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
185 |
|
0 | 186 |
|
187 |
LOCAL_C TBool SetupDrivesForPlatform(TInt& aDrive, TInt& aSocket) |
|
188 |
/** |
|
189 |
* Finds a suitable drive for the media change test |
|
190 |
* |
|
191 |
* @param aDrive The number of the local drive to test |
|
192 |
* @param aSocket The number of the socket to test |
|
193 |
* @return TBool ETrue if a suitable drive is found, EFalse otherwise. |
|
194 |
*/ |
|
195 |
{ |
|
196 |
||
197 |
TDriveInfoV1Buf diBuf; |
|
198 |
UserHal::DriveInfo(diBuf); |
|
199 |
TDriveInfoV1 &di=diBuf(); |
|
200 |
||
201 |
aDrive = -1; |
|
202 |
aSocket = -1; |
|
203 |
||
102
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
204 |
TLocalDriveCapsV5 pagingMediaCaps; |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
205 |
TBool pagingMediaCheck = EFalse; |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
206 |
if(DataPagingMediaCaps(pagingMediaCaps) == KErrNone) |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
207 |
{ |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
208 |
pagingMediaCheck = ETrue; |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
209 |
} |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
210 |
|
0 | 211 |
for(aDrive=0; aDrive < di.iTotalSupportedDrives; aDrive++) |
212 |
{ |
|
213 |
test.Printf(_L(" Drive %d - %S\r\n"), aDrive, &di.iDriveName[aDrive]); |
|
214 |
if(di.iDriveName[aDrive].MatchF(_L("MultiMediaCard0")) == KErrNone) |
|
102
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
215 |
{ |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
216 |
if(pagingMediaCheck) |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
217 |
{ |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
218 |
if( ! IsDriveOnPagingMedia(aDrive, pagingMediaCaps)) |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
219 |
{ |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
220 |
break; |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
221 |
} |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
222 |
} |
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
223 |
} |
0 | 224 |
} |
225 |
||
226 |
if(aDrive == di.iTotalSupportedDrives) |
|
227 |
{ |
|
228 |
test.Printf(_L(" MMC Drive Not Found\r\n")); |
|
229 |
return EFalse; |
|
230 |
} |
|
231 |
||
232 |
||
233 |
for(aSocket=0; aSocket < di.iTotalSockets; aSocket++) |
|
234 |
{ |
|
235 |
test.Printf(_L("Socket %d - %S\r\n"), aSocket, &di.iSocketName[aSocket]); |
|
236 |
if(di.iSocketName[aSocket].MatchF(_L("MultiMediaCard0")) == KErrNone) |
|
237 |
break; |
|
238 |
} |
|
239 |
||
240 |
if(aSocket == di.iTotalSockets) |
|
241 |
{ |
|
242 |
test.Printf(_L(" MMC Socket Not Found\r\n")); |
|
243 |
return EFalse; |
|
244 |
} |
|
245 |
||
246 |
return ETrue; |
|
247 |
} |
|
248 |
||
249 |
LOCAL_C void TestMediaAccess(TInt aExpectedError, TBool aExpectedChange) |
|
250 |
/** |
|
251 |
* Tests that the drive is accessable (or not) by issuing a request |
|
252 |
* to power up the media. Also verifies that the attributes are correct. |
|
253 |
* |
|
254 |
* @param aExpectedError The expected result of powering up the drive |
|
255 |
* @param aExpectedChange ETrue if the changed flag is expected to be set |
|
256 |
* |
|
257 |
* @return ETrue if successful, EFalse otherwise |
|
258 |
*/ |
|
259 |
{ |
|
260 |
||
261 |
RTimer rto; |
|
262 |
TInt r = rto.CreateLocal(); |
|
263 |
test(r == KErrNone); |
|
264 |
||
265 |
TRequestStatus rtoStat; |
|
266 |
rto.After(rtoStat, KPowerUpTimeOut); |
|
267 |
test(rtoStat == KRequestPending); |
|
268 |
||
269 |
if(aExpectedChange) |
|
270 |
{ |
|
271 |
// TheChangedFlag is set when the door is opened if media was present. |
|
272 |
// The asynch notifier is signalled when media is removed OR inserted. |
|
273 |
User::WaitForRequest(TheMediaStatus, rtoStat); |
|
274 |
test(TheMediaStatus != KRequestPending); |
|
275 |
} |
|
276 |
||
277 |
// ...aChangedFlag's purpose is to notify us of media removal. |
|
278 |
test_Equal(aExpectedChange,TheChangedFlag); |
|
279 |
||
280 |
TheDrive.NotifyChange(&TheMediaStatus); |
|
281 |
TheChangedFlag = EFalse; |
|
282 |
||
283 |
// Attempt to power up the drive |
|
284 |
TLocalDriveCapsV2Buf info; |
|
285 |
do |
|
286 |
{ |
|
287 |
r = TheDrive.Caps(info); |
|
288 |
} |
|
289 |
while(r != aExpectedError && rtoStat == KRequestPending); |
|
290 |
||
291 |
rto.Cancel(); |
|
292 |
rto.Close(); |
|
293 |
||
294 |
// ...was the error as expected? |
|
295 |
test(r == aExpectedError); |
|
296 |
||
297 |
// ...and are the caps still OK? |
|
298 |
if(r == KErrNone) |
|
299 |
test(info().iType == EMediaHardDisk); |
|
300 |
else if(r == KErrNotReady) |
|
301 |
test(info().iType == EMediaNotPresent); |
|
302 |
||
303 |
if(aExpectedChange == EFalse) |
|
304 |
test(TheMediaStatus == KRequestPending); |
|
305 |
} |
|
306 |
||
307 |
LOCAL_C void NextTest(const TDesC& aTitle, TInt aCycles) |
|
308 |
/** |
|
309 |
* Simply displays a string on the console and the current iteration. |
|
310 |
* |
|
311 |
* @param aTitle The text to be displayed |
|
312 |
* @param aCycles The current iteration |
|
313 |
*/ |
|
314 |
{ |
|
315 |
test.Console()->SetPos(20, 25); |
|
102
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
316 |
test.Printf(_L("%S [%d cycles]\n"), &aTitle, aCycles); |
0 | 317 |
#ifdef __MANUAL_TEST__ |
318 |
test.Console()->SetPos(20, 27); |
|
102
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
319 |
test.Printf(_L("<press a key>\n")); |
0 | 320 |
test.Getch(); |
321 |
#endif |
|
322 |
} |
|
102
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
323 |
|
0 | 324 |
GLDEF_C TInt E32Main() |
325 |
/** |
|
326 |
* Test Entry Point for T_MEDCH. |
|
327 |
* |
|
328 |
* This test uses the associated driver (D_MEDCH) to simulate media removal and |
|
329 |
* door opening/closing. The media is powered up in each state and verified that |
|
330 |
* the correct error code and changed count is returned. |
|
331 |
*/ |
|
332 |
{ |
|
333 |
TBuf<64> b; |
|
334 |
test.Title(); |
|
335 |
||
336 |
/** |
|
337 |
* Load the associated media driver (MEDMMC by default). This is required to ensure |
|
338 |
* that the device can be powered up and the capabilities if the media accessed. |
|
339 |
*/ |
|
340 |
test.Start(_L("Load Media Driver")); |
|
341 |
TInt r; |
|
342 |
r=User::LoadPhysicalDevice(MMC_PDD_NAME); |
|
343 |
if(r==KErrNotFound) |
|
344 |
{ |
|
345 |
test.Printf(_L("Test not supported on this platform \n")); |
|
346 |
test.End(); |
|
347 |
return(0); |
|
348 |
} |
|
349 |
test(r==KErrNone || r==KErrAlreadyExists); |
|
350 |
||
351 |
/** |
|
352 |
* Connect to the required local drive. |
|
353 |
* TheChangedFlag is used for detection of media removal. |
|
354 |
*/ |
|
355 |
TInt drive; |
|
356 |
TInt socket; |
|
102
ef2a444a7410
Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
357 |
|
0 | 358 |
if(SetupDrivesForPlatform(drive, socket)) |
359 |
{ |
|
360 |
b.Format(_L("Connect to local drive %d"), drive); |
|
361 |
test.Next(b); |
|
362 |
TheDrive.Connect(drive, TheChangedFlag); |
|
363 |
||
364 |
/** |
|
365 |
* Read the drive capabilities to ensure that this test may be run. |
|
366 |
*/ |
|
367 |
test.Next(_L("Get drive capabilities")); |
|
368 |
TLocalDriveCapsV2Buf info; |
|
369 |
r = TheDrive.Caps(info); |
|
370 |
if(r == KErrNotReady || r == KErrNotSupported) |
|
371 |
{ |
|
372 |
test.Next(_L("\r\nTest requires media to be present and the door closed - Disconnecting")); |
|
373 |
TheDrive.Disconnect(); |
|
374 |
test.End(); |
|
375 |
return KErrNone; |
|
376 |
} |
|
377 |
test(r == KErrNone); |
|
378 |
||
379 |
test(TheDrive.Caps(info) == KErrNone); |
|
380 |
test(info().iType == EMediaHardDisk); |
|
381 |
||
382 |
/** |
|
383 |
* Load the media simulation test driver |
|
384 |
*/ |
|
385 |
test.Next(_L("Load media change logical device")); |
|
386 |
r=User::LoadLogicalDevice(_L("D_MEDCH")); |
|
387 |
test(r == KErrNone || r == KErrAlreadyExists); |
|
388 |
||
389 |
test.Next(_L("Open device")); |
|
390 |
r=TheMediaChange.Open(socket, TheMediaChange.VersionRequired()); |
|
391 |
if(r == KErrNotSupported) |
|
392 |
{ |
|
393 |
test.Next(_L("\r\nTest not supported on this drive - Disconnecting")); |
|
394 |
r=User::FreeLogicalDevice(_L("MedCh")); |
|
395 |
test(r == KErrNone); |
|
396 |
TheDrive.Disconnect(); |
|
397 |
test.End(); |
|
398 |
return KErrNone; |
|
399 |
} |
|
400 |
test(r == KErrNone); |
|
401 |
||
402 |
/** |
|
403 |
* Verify that the system supports simulation of media change events |
|
404 |
*/ |
|
405 |
test.Next(_L("Test support for media change simulation")); |
|
406 |
r = TheMediaChange.DoorNormal(); |
|
407 |
test(r == KErrNone || r == KErrNotSupported); |
|
408 |
||
409 |
/** |
|
410 |
* Now for the real testing... |
|
411 |
*/ |
|
412 |
if(r == KErrNone) |
|
413 |
{ |
|
414 |
/** |
|
415 |
* Test0 - Simulate 2 consecutive door open interrupts |
|
416 |
*/ |
|
417 |
test.Next(_L("Test that the pbus can handle 2 consecutive door open interrupts")); |
|
418 |
TheDrive.NotifyChange(&TheMediaStatus); |
|
419 |
r = TheMediaChange.DoubleDoorOpen(); |
|
420 |
test(r == KErrNone || r == KErrNotSupported); |
|
421 |
TestMediaAccess(KErrNone, ETrue); |
|
422 |
||
423 |
||
424 |
TInt cycles=0; |
|
425 |
#if defined(__SOAK_TEST__) |
|
426 |
TRequestStatus endStat; |
|
427 |
test.Console()->Read(endStat); |
|
428 |
while(endStat == KRequestPending) |
|
429 |
#elif !defined(__MANUAL_TEST__) |
|
430 |
RTimer t; |
|
431 |
r=t.CreateLocal(); |
|
432 |
test(r == KErrNone); |
|
433 |
TRequestStatus endStat; |
|
434 |
t.After(endStat, KMaxTestTime); |
|
435 |
test(endStat == KRequestPending); |
|
436 |
while(endStat == KRequestPending) |
|
437 |
#endif |
|
438 |
{ |
|
439 |
TheChangedFlag = EFalse; |
|
440 |
||
441 |
TheDrive.NotifyChange(&TheMediaStatus); |
|
442 |
||
443 |
/** |
|
444 |
* Test1 - Simulate door open |
|
445 |
* - Power up responds with KErrNotReady |
|
446 |
*/ |
|
447 |
NextTest(_L("Open Door......"), cycles); |
|
448 |
#ifndef __MANUAL_TEST__ |
|
449 |
test(TheMediaChange.DoorOpen() == KErrNone); |
|
450 |
#endif |
|
451 |
TestMediaAccess(KErrNotReady, ETrue); |
|
452 |
TheDrive.NotifyChange(&TheMediaStatus); |
|
453 |
||
454 |
/** |
|
455 |
* Test2 - Simulate door closed (with media removed) |
|
456 |
* - Power up responds with KErrNotReady |
|
457 |
*/ |
|
458 |
#ifndef __DEVICE_HAS_NO_DOOR__ |
|
459 |
NextTest(_L("Remove Media..."), cycles); |
|
460 |
#ifndef __MANUAL_TEST__ |
|
461 |
test(TheMediaChange.DoorClose(EFalse) == KErrNone); |
|
462 |
#endif |
|
463 |
TestMediaAccess(KErrNotReady, EFalse); |
|
464 |
/** |
|
465 |
* Test3 - Simulate door open |
|
466 |
* - Power up responds with KErrNotReady |
|
467 |
*/ |
|
468 |
NextTest(_L("Open Door......"), cycles); |
|
469 |
#ifndef __MANUAL_TEST__ |
|
470 |
test(TheMediaChange.DoorOpen() == KErrNone); |
|
471 |
#endif |
|
472 |
TestMediaAccess(KErrNotReady, EFalse); // Power up responds with KErrNotReady |
|
473 |
#endif |
|
474 |
/** |
|
475 |
* Test4 - Simulate door closed (with media present) |
|
476 |
* - Power up responds with KErrNone |
|
477 |
*/ |
|
478 |
NextTest(_L("Insert Media..."), cycles); |
|
479 |
#ifndef __MANUAL_TEST__ |
|
480 |
test(TheMediaChange.DoorClose(ETrue) == KErrNone); |
|
481 |
#endif |
|
482 |
TestMediaAccess(KErrNone, ETrue); |
|
483 |
++cycles; |
|
484 |
} |
|
485 |
||
486 |
test.Console()->SetPos(0, 27); |
|
487 |
#if !defined(__SOAK_TEST__) && !defined(__MANUAL_TEST__) |
|
488 |
t.Close(); |
|
489 |
#endif |
|
490 |
} |
|
491 |
else if(r == KErrNotSupported) |
|
492 |
{ |
|
493 |
test.Printf(_L("Media change simulation not supported")); |
|
494 |
} |
|
495 |
||
496 |
/** |
|
497 |
* Tidy up and exit |
|
498 |
*/ |
|
499 |
test.Next(_L("\r\nClose device")); |
|
500 |
TheMediaChange.Close(); |
|
501 |
||
502 |
test.Next(_L("Free device")); |
|
503 |
r=User::FreeLogicalDevice(_L("MedCh")); |
|
504 |
test(r == KErrNone); |
|
505 |
||
506 |
b.Format(_L("\r\nDisconnect from local drive %d "), drive); |
|
507 |
test.Next(b); |
|
508 |
TheDrive.Disconnect(); |
|
509 |
} |
|
510 |
||
511 |
test.End(); |
|
512 |
return(0); |
|
513 |
} |
|
514 |