1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/persistentdata/persistentstorage/sql/TEST/t_sqlstartup.cpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,541 @@
1.4 +// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +#include <e32test.h>
1.20 +#include <bautils.h>
1.21 +#include "SqlSrvMain.h"
1.22 +#include "SqlSrvStartup.h"
1.23 +#include "SqlSrvUtil.h"
1.24 +
1.25 +_LIT(KCfgDb1ConfigFilePath, "c:\\private\\10281e17\\cfg[10281E17]t_sqlstartup1.db.02"); // config file version 2 for t_sqlstartup1.db
1.26 +_LIT(KCfgDb2ConfigFilePath, "c:\\private\\10281e17\\cfg[10281E17]t_sqlstartup2.db.05"); // config file version 5 for t_sqlstartup2.db
1.27 +
1.28 +//This subdir is created by t_sqlenvcreate app. It should not be returned in the list of files for backup.
1.29 +_LIT(KPrivateSubDir, "c:\\private\\10281e17\\TestDir.db");
1.30 +
1.31 +///////////////////////////////////////////////////////////////////////////////////////
1.32 +
1.33 +RTest TheTest(_L("t_sqlstartup test"));
1.34 +
1.35 +RFs TheFs;
1.36 +
1.37 +static TInt TheProcessHandleCount = 0;
1.38 +static TInt TheThreadHandleCount = 0;
1.39 +static TInt TheAllocatedCellsCount = 0;
1.40 +
1.41 +#ifdef _DEBUG
1.42 +static const TInt KBurstRate = 20;
1.43 +#endif
1.44 +
1.45 +///////////////////////////////////////////////////////////////////////////////////////
1.46 +
1.47 +void DeleteTestFiles()
1.48 + {
1.49 + (void)TheFs.Delete(KCfgDb2ConfigFilePath);
1.50 + (void)TheFs.Delete(KCfgDb1ConfigFilePath);
1.51 + TheFs.Close();
1.52 + }
1.53 +
1.54 +///////////////////////////////////////////////////////////////////////////////////////
1.55 +///////////////////////////////////////////////////////////////////////////////////////
1.56 +//Test macros and functions
1.57 +void Check(TInt aValue, TInt aLine)
1.58 + {
1.59 + if(!aValue)
1.60 + {
1.61 + DeleteTestFiles();
1.62 + RDebug::Print(_L("*** Expresssion evaluated to false\r\n"));
1.63 + TheTest(EFalse, aLine);
1.64 + }
1.65 + }
1.66 +void Check(TInt aValue, TInt aExpected, TInt aLine)
1.67 + {
1.68 + if(aValue != aExpected)
1.69 + {
1.70 + DeleteTestFiles();
1.71 + RDebug::Print(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
1.72 + TheTest(EFalse, aLine);
1.73 + }
1.74 + }
1.75 +#define TEST(arg) ::Check((arg), __LINE__)
1.76 +#define TEST2(aValue, aExpected) ::Check(aValue, aExpected, __LINE__)
1.77 +
1.78 +////////////////////////////////////////////////////////////////////////////////////////////////////////////
1.79 +
1.80 +static void MarkHandles()
1.81 + {
1.82 + RThread().HandleCount(TheProcessHandleCount, TheThreadHandleCount);
1.83 + }
1.84 +
1.85 +static void MarkAllocatedCells()
1.86 + {
1.87 + TheAllocatedCellsCount = User::CountAllocCells();
1.88 + }
1.89 +
1.90 +static void CheckAllocatedCells()
1.91 + {
1.92 + TInt allocatedCellsCount = User::CountAllocCells();
1.93 + TEST2(allocatedCellsCount, TheAllocatedCellsCount);
1.94 + }
1.95 +
1.96 +static void CheckHandles()
1.97 + {
1.98 + TInt endProcessHandleCount;
1.99 + TInt endThreadHandleCount;
1.100 +
1.101 + RThread().HandleCount(endProcessHandleCount, endThreadHandleCount);
1.102 +
1.103 + TEST2(TheProcessHandleCount, endProcessHandleCount);
1.104 + TEST2(TheThreadHandleCount, endThreadHandleCount);
1.105 + }
1.106 +
1.107 +static void OomPreStep(TInt
1.108 +#ifdef _DEBUG
1.109 + aFailingAllocationNo
1.110 +#endif
1.111 + )
1.112 + {
1.113 + MarkHandles();
1.114 + MarkAllocatedCells();
1.115 + __UHEAP_MARK;
1.116 + __UHEAP_SETBURSTFAIL(RAllocator::EBurstFailNext, aFailingAllocationNo, KBurstRate);
1.117 + }
1.118 +
1.119 +static void OomPostStep()
1.120 + {
1.121 + __UHEAP_RESET;
1.122 + __UHEAP_MARKEND;
1.123 + CheckAllocatedCells();
1.124 + CheckHandles();
1.125 + }
1.126 +
1.127 +////////////////////////////////////////////////////////////////////////////////////////////////////////////
1.128 +////////////////////////////////////////////////////////////////////////////////////////////////////////////
1.129 +
1.130 +static void CreateAndDestroySqlServerL()
1.131 + {
1.132 + CSqlServer* server = CSqlServer::NewLC();
1.133 + //Drive C: to the RSqlDriveSpaceCol object. This will allow "reserve drive space" construct/destroy code to be tested.
1.134 + RSqlDriveSpaceCol& drvcol = server->DriveSpaceCol();
1.135 + drvcol.AddL(EDriveC);
1.136 + CleanupStack::PopAndDestroy(server);
1.137 + }
1.138 +
1.139 +static CSqlServer* CreateSqlServerL()
1.140 + {
1.141 + CSqlServer* server = CSqlServer::NewLC();
1.142 + CleanupStack::Pop(server);
1.143 + return server;
1.144 + }
1.145 +
1.146 +/**
1.147 +@SYMTestCaseID PDS-SQL-UT-4159
1.148 +@SYMTestCaseDesc SQL server startup OOM test
1.149 +@SYMTestPriority High
1.150 +@SYMTestActions Runs the SQL server startup code in an OOM loop.
1.151 +@SYMTestExpectedResults Test must not fail
1.152 +@SYMDEF DEF144096
1.153 +*/
1.154 +void SqlServerStartupOomTest()
1.155 + {
1.156 + TInt err = KErrNoMemory;
1.157 + TInt failingAllocationNo = 0;
1.158 + TheTest.Printf(_L("Iteration:\r\n"));
1.159 + while(err == KErrNoMemory)
1.160 + {
1.161 + TheTest.Printf(_L(" %d"), ++failingAllocationNo);
1.162 + OomPreStep(failingAllocationNo);
1.163 + TRAP(err, CreateAndDestroySqlServerL());
1.164 + OomPostStep();
1.165 + }
1.166 + if(err != KErrNoMemory)
1.167 + {
1.168 + TEST2(err, KErrNone);
1.169 + }
1.170 + TheTest.Printf(_L("\r\n===OOM test succeeded at heap failure rate of %d ===\r\n"), failingAllocationNo);
1.171 + }
1.172 +
1.173 +/**
1.174 +@SYMTestCaseID PDS-SQL-UT-4160
1.175 +@SYMTestCaseDesc CSqlServer::GetBackUpListL() OOM test
1.176 +@SYMTestPriority High
1.177 +@SYMTestActions Calls CSqlServer::GetBackUpListL() in an OOM loop.
1.178 +@SYMTestExpectedResults Test must not fail
1.179 +@SYMDEF DEF144096
1.180 +*/
1.181 +void GetBackupListOomTest()
1.182 + {
1.183 + CSqlServer* server = NULL;
1.184 + TRAPD(err, server = CreateSqlServerL());
1.185 + TEST2(err, KErrNone);
1.186 +
1.187 + TInt fileCnt = 0;
1.188 + err = KErrNoMemory;
1.189 + TInt failingAllocationNo = 0;
1.190 + TheTest.Printf(_L("Iteration:\r\n"));
1.191 + while(err == KErrNoMemory)
1.192 + {
1.193 + TheTest.Printf(_L(" %d"), ++failingAllocationNo);
1.194 + OomPreStep(failingAllocationNo);
1.195 + const TUid KDbUd = {0x98765432};
1.196 + RArray<HBufC*> files;
1.197 + TRAP(err, server->GetBackUpListL(KDbUd, EDriveC, files));
1.198 + fileCnt = files.Count();
1.199 + if(err == KErrNone)
1.200 + {
1.201 + //No directories should be returned in the list of files for backup
1.202 + for(TInt i=0;i<fileCnt;++i)
1.203 + {
1.204 + TPtrC fname = files[i]->Des();
1.205 + TInt rc = KPrivateSubDir().CompareF(fname);
1.206 + TEST(rc != 0);
1.207 + }
1.208 + }
1.209 + for(TInt j=0;j<files.Count();++j)
1.210 + {
1.211 + delete files[j];
1.212 + }
1.213 + files.Close();
1.214 + OomPostStep();
1.215 + }
1.216 +
1.217 + delete server;
1.218 +
1.219 + if(err != KErrNoMemory)
1.220 + {
1.221 + TEST2(err, KErrNone);
1.222 + }
1.223 + TheTest.Printf(_L("\r\n===OOM test succeeded at heap failure rate of %d ===\r\nFile count: %d\r\n"), failingAllocationNo, fileCnt);
1.224 + }
1.225 +
1.226 +/**
1.227 +@SYMTestCaseID PDS-SQL-UT-4161
1.228 +@SYMTestCaseDesc SQL server startup file I/O error simulation test
1.229 +@SYMTestPriority High
1.230 +@SYMTestActions Runs the SQL server startup code in a file I/O error simulation loop.
1.231 +@SYMTestExpectedResults Test must not fail
1.232 +@SYMDEF DEF144096
1.233 +*/
1.234 +void SqlServerStartupFileIoErrorTest()
1.235 + {
1.236 + RFs fs;
1.237 + TInt err = fs.Connect();
1.238 + TEST2(err, KErrNone);
1.239 +
1.240 + for(TInt fsError=KErrNotFound;fsError>=KErrBadName;--fsError)
1.241 + {
1.242 + TheTest.Printf(_L("===Simulated error: %d\r\nIteration: "), fsError);
1.243 + err = KErrNotFound;
1.244 + TInt cnt=0;
1.245 + while(err<KErrNone)
1.246 + {
1.247 + TheTest.Printf(_L("%d "), cnt);
1.248 + (void)fs.SetErrorCondition(fsError, cnt);
1.249 + TRAP(err, CreateAndDestroySqlServerL());
1.250 + (void)fs.SetErrorCondition(KErrNone);
1.251 + if(err != KErrNone)
1.252 + {
1.253 + ++cnt;
1.254 + }
1.255 + }
1.256 + TEST2(err, KErrNone);
1.257 + TheTest.Printf(_L("\r\n===File I/O error simulation test succeeded on iteration %d===\r\n"), cnt);
1.258 + }
1.259 +
1.260 + fs.Close();
1.261 + }
1.262 +
1.263 +/**
1.264 +@SYMTestCaseID PDS-SQL-UT-4162
1.265 +@SYMTestCaseDesc CSqlServer::GetBackUpListL() file I/O error simulation test
1.266 +@SYMTestPriority High
1.267 +@SYMTestActions Calls CSqlServer::GetBackUpListL() in a file I/O error simulation loop.
1.268 +@SYMTestExpectedResults Test must not fail
1.269 +@SYMDEF DEF144096
1.270 +*/
1.271 +void GetBackupListFileIoErrorTest()
1.272 + {
1.273 + CSqlServer* server = NULL;
1.274 + TRAPD(err, server = CreateSqlServerL());
1.275 + TEST2(err, KErrNone);
1.276 +
1.277 + for(TInt fsError=KErrNotFound;fsError>=KErrBadName;--fsError)
1.278 + {
1.279 + TheTest.Printf(_L("===Simulated error: %d\r\nIteration: "), fsError);
1.280 + err = KErrNotFound;
1.281 + TInt fileCnt = 0;
1.282 + TInt cnt=0;
1.283 + while(err<KErrNone)
1.284 + {
1.285 + TheTest.Printf(_L("%d "), cnt);
1.286 + (void)server->Fs().SetErrorCondition(fsError, cnt);
1.287 + const TUid KDbUd = {0x98765432};
1.288 + RArray<HBufC*> files;
1.289 + TRAP(err, server->GetBackUpListL(KDbUd, EDriveC, files));
1.290 + fileCnt = files.Count();
1.291 + if(err == KErrNone)
1.292 + {
1.293 + //No directories should be returned in the list of files for backup
1.294 + for(TInt i=0;i<fileCnt;++i)
1.295 + {
1.296 + TPtrC fname = files[i]->Des();
1.297 + TInt rc = KPrivateSubDir().CompareF(fname);
1.298 + TEST(rc != 0);
1.299 + }
1.300 + }
1.301 + for(TInt j=0;j<files.Count();++j)
1.302 + {
1.303 + delete files[j];
1.304 + }
1.305 + files.Close();
1.306 + (void)server->Fs().SetErrorCondition(KErrNone);
1.307 + if(err != KErrNone)
1.308 + {
1.309 + ++cnt;
1.310 + }
1.311 + }
1.312 + TEST2(err, KErrNone);
1.313 + TheTest.Printf(_L("\r\n===File I/O error simulation test succeeded on iteration %d===\r\nFile count: %d\r\n"), cnt, fileCnt);
1.314 + }
1.315 +
1.316 + delete server;
1.317 + }
1.318 +
1.319 +/**
1.320 +@SYMTestCaseID PDS-SQL-UT-4224
1.321 +@SYMTestCaseDesc CSqlServer::GetBackUpListL() functional test
1.322 +@SYMTestPriority High
1.323 +@SYMTestActions Calls CSqlServer::GetBackUpListL() and tests the output, when the drive is read-only,
1.324 + when there is a sub-directory which name is matching the search pattern.
1.325 +@SYMTestExpectedResults Test must not fail
1.326 +*/
1.327 +void GetBackupListFunctionalTest()
1.328 + {
1.329 + CSqlServer* server = NULL;
1.330 + TRAPD(err, server = CreateSqlServerL());
1.331 + TEST2(err, KErrNone);
1.332 + //Case 1: database with specified uid bellow do exist (on drive C). There will be one subdirectory matching the search pattern.
1.333 + const TDriveNumber KTestDrvNum1 = EDriveC;
1.334 + const TUid KDbUid = {0x98765432};
1.335 + TDriveUnit testDrive(KTestDrvNum1);
1.336 + TDriveName testDriveName = testDrive.Name();
1.337 + testDriveName.LowerCase();
1.338 + //One test directory will be created, which name will be matching the search pattern.
1.339 + //The directory name should not be included in the list with the file names.
1.340 + TFileName testFileName;
1.341 + err = server->Fs().PrivatePath(testFileName);
1.342 + TEST2(err, KErrNone);
1.343 + testFileName.Append(KDbUid.Name());
1.344 + _LIT(KTestPath, "t_startup\\");
1.345 + testFileName.Append(KTestPath);
1.346 + testFileName.Append(_L("t_startup.db"));
1.347 + TParse parse;
1.348 + err = parse.Set(testFileName, &testDriveName, 0);
1.349 + TEST2(err, KErrNone);
1.350 + err = server->Fs().MkDirAll(parse.FullName());
1.351 + TEST(err == KErrNone || err == KErrAlreadyExists);
1.352 + //
1.353 + RArray<HBufC*> files;
1.354 + TRAP(err, server->GetBackUpListL(KDbUid, KTestDrvNum1, files));
1.355 + TEST2(err, KErrNone);
1.356 + TInt fileCnt = files.Count();
1.357 + for(TInt i=0;i<fileCnt;++i)
1.358 + {
1.359 + TPtrC fname = files[i]->Des();
1.360 + TheTest.Printf(_L("Db: %S\r\n"), &fname);
1.361 + TEST(fname.FindF(KTestPath) < 0);
1.362 + //The name should include the full path + the drive
1.363 + err = parse.Set(fname, 0, 0);
1.364 + TEST2(err, KErrNone);
1.365 + TEST(parse.DrivePresent());
1.366 + TEST(parse.PathPresent());
1.367 + TDriveName driveName(parse.Drive());
1.368 + driveName.LowerCase();
1.369 + delete files[i];
1.370 + TEST(driveName == testDriveName);
1.371 + }
1.372 + files.Close();
1.373 + //Case 2: drive Z:. No files should be returned.
1.374 + const TDriveNumber KTestDrvNum2 = EDriveZ;
1.375 + TRAP(err, server->GetBackUpListL(KDbUid, KTestDrvNum2, files));
1.376 + TEST2(err, KErrNone);
1.377 + fileCnt = files.Count();
1.378 + TEST2(fileCnt, 0);
1.379 + //Case 3: drive A:. The drive does not exist. No files should be returned.
1.380 + const TDriveNumber KTestDrvNum3 = EDriveA;
1.381 + TRAP(err, server->GetBackUpListL(KDbUid, KTestDrvNum3, files));
1.382 + TheTest.Printf(_L("Drive %d, err=%d\r\n"), KTestDrvNum3, err);
1.383 + fileCnt = files.Count();
1.384 + TEST2(fileCnt, 0);
1.385 + //
1.386 + delete server;
1.387 + }
1.388 +
1.389 +/**
1.390 +@SYMTestCaseID PDS-SQL-UT-4163
1.391 +@SYMTestCaseDesc Test for DEF144196: SQL, server code coverage can be improved
1.392 +@SYMTestPriority High
1.393 +@SYMTestActions Tests the UTF conversion functions implemented in SqlSrvUtil.cpp.
1.394 +@SYMTestExpectedResults Test must not fail
1.395 +@SYMDEF DEF144196
1.396 +*/
1.397 +void UtfConversionTest()
1.398 + {
1.399 + ///////// UTF16ToUTF8() ///////////////////////
1.400 + _LIT(KStr16, "abcd");
1.401 + _LIT8(KStr8, "abcd");
1.402 + TBuf8<KMaxFileName + 1> bufout;
1.403 + TBool rc = UTF16ToUTF8(KStr16, bufout);
1.404 + TEST(rc);
1.405 + TEST(bufout == KStr8);
1.406 + //Test where the input buffer contains non-convertible characters
1.407 + TBuf<2> name2;
1.408 + name2.SetLength(2);
1.409 + name2[0] = TChar(0xD800);
1.410 + name2[1] = TChar(0xFC00);
1.411 + rc = UTF16ToUTF8(name2, bufout);
1.412 + TEST(!rc);
1.413 + ///////// UTF16ToUTF8Z() ///////////////////////
1.414 + _LIT8(KStr8Z, "abcd\x0");
1.415 + rc = UTF16ToUTF8Z(KStr16, bufout);
1.416 + TEST(rc);
1.417 + TEST(bufout == KStr8Z);
1.418 + //Test where the input buffer contains non-convertible characters
1.419 + rc = UTF16ToUTF8Z(name2, bufout);
1.420 + TEST(!rc);
1.421 + ///////// UTF16ZToUTF8Z() ///////////////////////
1.422 + _LIT(KStr16Z, "abcd\x0");
1.423 + rc = UTF16ZToUTF8Z(KStr16Z, bufout);
1.424 + TEST(rc);
1.425 + TEST(bufout == KStr8Z);
1.426 + //Test where the input buffer contains non-convertible characters
1.427 + TBuf<3> name3;
1.428 + name3.SetLength(3);
1.429 + name3[0] = TChar(0xD800);
1.430 + name3[1] = TChar(0xFC00);
1.431 + name3[2] = TChar(0x0000);
1.432 + rc = UTF16ZToUTF8Z(name3, bufout);
1.433 + TEST(!rc);
1.434 + }
1.435 +
1.436 +/**
1.437 +@SYMTestCaseID PDS-SQL-UT-4175
1.438 +@SYMTestCaseDesc Test for DEF144937: SQL, SQL server, the code coverage can be improved in some areas.
1.439 +@SYMTestPriority High
1.440 +@SYMTestActions The test creates a SQL server instance and performs some basic operations with
1.441 + RSqlDriveSpaceCol object owned by the server, such as: adding a new drive,
1.442 + getting an access to the reserved drive space, releasing the access.
1.443 +@SYMTestExpectedResults Test must not fail
1.444 +@SYMDEF DEF144937
1.445 +*/
1.446 +void ReserveDriveSpaceTest()
1.447 + {
1.448 + CSqlServer* srv = NULL;
1.449 + TRAPD(err, srv = CreateSqlServerL());
1.450 + TEST2(err, KErrNone);
1.451 +
1.452 + RSqlDriveSpaceCol& drvcol = srv->DriveSpaceCol();
1.453 + TRAP(err, drvcol.AddL(EDriveC));
1.454 + TEST2(err, KErrNone);
1.455 +
1.456 + CSqlDriveSpace* drvspace = drvcol.Find(EDriveZ);
1.457 + TEST(!drvspace);
1.458 + drvspace = drvcol.Find(EDriveC);
1.459 + TEST(drvspace != NULL);
1.460 +
1.461 + TDriveNumber drvnum = drvspace->Drive();
1.462 + TEST2(drvnum, EDriveC);
1.463 + //It is safe to call GetAccessL() more than once. The access is reference counted.
1.464 + TRAP(err, drvspace->GetAccessL());
1.465 + TEST2(err, KErrNone);
1.466 + TRAP(err, drvspace->GetAccessL());
1.467 + TEST2(err, KErrNone);
1.468 + //It is safe if ReleaseAccess() call count do not match GetAccessL() call count.
1.469 + drvspace->ReleaseAccess();
1.470 + drvspace->ReleaseAccess();
1.471 + drvspace->ReleaseAccess();
1.472 + //
1.473 + drvcol.ResetAndDestroy();
1.474 + delete srv;
1.475 + }
1.476 +
1.477 +void DoCreateCfgFile(const TDesC& aFileName, const TDesC8& aData)
1.478 + {
1.479 + RFile file;
1.480 + TInt err = file.Create(TheFs, aFileName, EFileRead | EFileWrite);
1.481 + TEST2(err, KErrNone);
1.482 + err = file.Write(aData);
1.483 + file.Close();
1.484 + TEST2(err, KErrNone);
1.485 + }
1.486 +
1.487 +void DoTests()
1.488 + {
1.489 + CActiveScheduler* scheduler = new CActiveScheduler;
1.490 + TEST(scheduler != NULL);
1.491 + CActiveScheduler::Install(scheduler);
1.492 +
1.493 + //Adding two db config files will allow CDbConfigFiles construct/destroy code also to be tested in the OOM tests.
1.494 + TInt err = TheFs.Connect();
1.495 + TEST2(err, KErrNone);
1.496 + DoCreateCfgFile(KCfgDb1ConfigFilePath, _L8("CREATE INDEX idx ON table1(i1);"));
1.497 + DoCreateCfgFile(KCfgDb2ConfigFilePath, _L8("CREATE INDEX idx1 ON table1(i1);CREATE INDEX idx2 ON table2(i2)"));
1.498 +
1.499 + TheTest.Start(_L(" @SYMTestCaseID:PDS-SQL-UT-4159 SQL server startup OOM test"));
1.500 + SqlServerStartupOomTest();
1.501 +
1.502 + TheTest.Next (_L(" @SYMTestCaseID:PDS-SQL-UT-4160 CSqlServer::GetBackUpListL() OOM test"));
1.503 + GetBackupListOomTest();
1.504 +
1.505 + TheTest.Next (_L(" @SYMTestCaseID:PDS-SQL-UT-4161 SQL server startup file I/O error simulation test"));
1.506 + SqlServerStartupFileIoErrorTest();
1.507 +
1.508 + TheTest.Next (_L(" @SYMTestCaseID:PDS-SQL-UT-4162 CSqlServer::GetBackUpListL() file I/O error simulation test"));
1.509 + GetBackupListFileIoErrorTest();
1.510 +
1.511 + TheTest.Next (_L(" @SYMTestCaseID:PDS-SQL-UT-4224 CSqlServer::GetBackUpListL() functional test"));
1.512 + GetBackupListFunctionalTest();
1.513 +
1.514 + TheTest.Next (_L(" @SYMTestCaseID:PDS-SQL-UT-4163 SQL server, UTF conversion test"));
1.515 + UtfConversionTest();
1.516 +
1.517 + TheTest.Next (_L(" @SYMTestCaseID:PDS-SQL-UT-4175 Reserve drive space tests"));
1.518 + ReserveDriveSpaceTest();
1.519 +
1.520 + delete scheduler;
1.521 + }
1.522 +
1.523 +TInt E32Main()
1.524 + {
1.525 + TheTest.Title();
1.526 +
1.527 + CTrapCleanup* tc = CTrapCleanup::New();
1.528 + TheTest(tc != NULL);
1.529 +
1.530 + __UHEAP_MARK;
1.531 +
1.532 + DoTests();
1.533 + DeleteTestFiles();
1.534 +
1.535 + __UHEAP_MARKEND;
1.536 +
1.537 + TheTest.End();
1.538 + TheTest.Close();
1.539 +
1.540 + delete tc;
1.541 +
1.542 + User::Heap().Check();
1.543 + return KErrNone;
1.544 + }