--- a/loggingservices/eventlogger/test/inc/t_logutil2.h Fri May 14 17:36:33 2010 +0300
+++ b/loggingservices/eventlogger/test/inc/t_logutil2.h Thu May 27 14:29:47 2010 +0300
@@ -82,7 +82,7 @@
GLREF_D RFile theLog;
GLREF_D RLogTestSession theLogServ;
-#define __FILE_FAILNEXT(X) theFs.SetErrorCondition(KErrGeneral, X)
+#define __FILE_FAILNEXT(err, iteration) theFs.SetErrorCondition(err, iteration)
#define __FILE_RESET theFs.SetErrorCondition(KErrNone, 0)
#if defined(_UNICODE)
--- a/loggingservices/eventlogger/test/src/t_logfile.cpp Fri May 14 17:36:33 2010 +0300
+++ b/loggingservices/eventlogger/test/src/t_logfile.cpp Thu May 27 14:29:47 2010 +0300
@@ -198,7 +198,9 @@
while(!finished)
{
- if(failCount == 4)
+ TheTest.Printf(_L("%d\r\n"), failCount);
+
+ if(failCount > 8)
{
TRAP(error, client = CLogClient::NewL(theFs));
TEST2(error, KErrNone);
@@ -206,8 +208,8 @@
finished = ETrue;
continue;
}
-
- __FILE_FAILNEXT(++failCount);
+
+ __FILE_FAILNEXT(KErrNoMemory, failCount++);
TRAP(error, client = CLogClient::NewL(theFs));
@@ -220,13 +222,13 @@
}
else
{
- TEST2(error, KErrGeneral);
+ TEST2(error, KErrNoMemory);
TestUtils::DeleteDatabaseL();
}
}
delete client;
- TheTest.Printf(_L("The test has succeeded at iteration %d\n"), failCount);
+ TheTest.Printf(_L("\r\nThe test has succeeded at iteration %d\n"), failCount);
}
/**
@@ -258,8 +260,7 @@
while(!finished)
{
error = KErrNone;
-
- if(failCount == 4)
+ if(failCount == 8)
{
aClient.AddEventType(*type, active->iStatus);
active->StartL();
@@ -268,9 +269,11 @@
finished = ETrue;
continue;
}
+
+ TheTest.Printf(_L("%d \r"), failCount);
+
+ __FILE_FAILNEXT(KErrNoMemory, failCount++);
- __FILE_FAILNEXT(++failCount);
-
aClient.AddEventType(*type, active->iStatus);
active->StartL();
@@ -283,7 +286,7 @@
__FILE_RESET;
- if (error == KErrGeneral)
+ if (error == KErrNoMemory)
{
active->StartL();
aClient.GetEventType(*type, active->iStatus);
@@ -301,7 +304,7 @@
TEST2(active->iStatus.Int(), KErrAlreadyExists);
CleanupStack::PopAndDestroy(2); // active, type
- TheTest.Printf(_L("The test has succeeded at iteration %d\n"), failCount);
+ TheTest.Printf(_L("\r\nThe test has succeeded at iteration %d\n"), failCount);
}
/**
@@ -329,7 +332,8 @@
while(!finished)
{
- __FILE_FAILNEXT(++failCount);
+ TheTest.Printf(_L("%d \r"), failCount);
+ __FILE_FAILNEXT(KErrNoMemory, failCount++);
aClient.GetEventType(*type, active->iStatus);
@@ -340,7 +344,7 @@
finished = ETrue;
else
{
- TEST2(active->iStatus.Int(), KErrGeneral);
+ TEST2(active->iStatus.Int(), KErrNoMemory);
TEST(type->Description() == KNullDesC);
}
@@ -352,7 +356,7 @@
TEST(type->LoggingEnabled());
CleanupStack::PopAndDestroy(2); // active, type
- TheTest.Printf(_L("The test has succeeded at iteration %d\n"), failCount);
+ TheTest.Printf(_L("\r\nThe test has succeeded at iteration %d\n"), failCount);
}
/**
@@ -386,7 +390,7 @@
type->SetDescription(KTestEventDesc2);
type->SetLoggingEnabled(EFalse);
- if(failCount == 3)
+ if(failCount == 8)
{
aClient.ChangeEventType(*type, active->iStatus);
active->StartL();
@@ -396,7 +400,8 @@
continue;
}
- __FILE_FAILNEXT(++failCount);
+ TheTest.Printf(_L("%d \r"), failCount);
+ __FILE_FAILNEXT(KErrNoMemory, failCount++);
aClient.ChangeEventType(*type, active->iStatus);
@@ -410,7 +415,7 @@
__FILE_RESET;
- if (error == KErrGeneral)
+ if (error == KErrNoMemory)
{
active->StartL();
aClient.GetEventType(*type, active->iStatus);
@@ -436,7 +441,7 @@
TEST(type->LoggingEnabled() == EFalse);
CleanupStack::PopAndDestroy(2); // type, active
- TheTest.Printf(_L("The test has succeeded at iteration %d\n"), failCount);
+ TheTest.Printf(_L("\r\nThe test has succeeded at iteration %d\n"), failCount);
}
/**
@@ -467,7 +472,7 @@
{
error = KErrNone;
- if(failCount == 3)
+ if(failCount == 8)
{
aClient.DeleteEventType(KTestEventUid, active->iStatus);
active->StartL();
@@ -477,7 +482,8 @@
continue;
}
- __FILE_FAILNEXT(++failCount);
+ TheTest.Printf(_L("%d \r"), failCount);
+ __FILE_FAILNEXT(KErrNoMemory, failCount++);
aClient.DeleteEventType(KTestEventUid, active->iStatus);
@@ -491,7 +497,7 @@
__FILE_RESET;
- if (error == KErrGeneral)
+ if (error == KErrNoMemory)
{
active->StartL();
aClient.GetEventType(*type, active->iStatus);
@@ -508,7 +514,7 @@
TEST2(active->iStatus.Int(), KErrNotFound);
CleanupStack::PopAndDestroy(2); // type, active
- TheTest.Printf(_L("The test has succeeded at iteration %d\n"), failCount);
+ TheTest.Printf(_L("\r\nThe test has succeeded at iteration %d\n"), failCount);
}
/**
@@ -568,7 +574,7 @@
{
error = KErrNone;
- if(failCount == 3)
+ if(failCount == 8)
{
aClient.AddEvent(*event, active->iStatus);
active->StartL();
@@ -578,7 +584,8 @@
continue;
}
- __FILE_FAILNEXT(++failCount);
+ TheTest.Printf(_L("%d \r"), failCount);
+ __FILE_FAILNEXT(KErrNoMemory, failCount++);
aClient.AddEvent(*event, active->iStatus);
active->StartL();
@@ -591,9 +598,8 @@
__FILE_RESET;
- if (error == KErrGeneral)
+ if (error == KErrNoMemory)
{
- TEST2(error, KErrGeneral);
event->SetId(0);
active->StartL();
@@ -617,7 +623,7 @@
TEST2(active->iStatus.Int(), KErrNone);
CleanupStack::PopAndDestroy(3); // event, active, type
- TheTest.Printf(_L("The test has succeeded at iteration %d\n"), failCount);
+ TheTest.Printf(_L("\r\nThe test has succeeded at iteration %d\n"), failCount);
}
/**
@@ -646,7 +652,8 @@
while(!finished)
{
- __FILE_FAILNEXT(++failCount);
+ TheTest.Printf(_L("%d \r"), failCount);
+ __FILE_FAILNEXT(KErrNoMemory, failCount++);
aClient.GetEvent(*event, active->iStatus);
active->StartL();
@@ -655,7 +662,7 @@
if (active->iStatus == KErrNone)
finished = ETrue;
else
- TEST2(active->iStatus.Int(), KErrGeneral);
+ TEST2(active->iStatus.Int(), KErrNoMemory);
__FILE_RESET;
}
@@ -676,7 +683,7 @@
TEST(event->Data() == KTestData1);
CleanupStack::PopAndDestroy(2); // event, active
- TheTest.Printf(_L("The test has succeeded at iteration %d\n"), failCount);
+ TheTest.Printf(_L("\r\nThe test has succeeded at iteration %d\n"), failCount);
}
/**
@@ -722,7 +729,7 @@
event->SetLink(KTestLink2);
event->SetDataL(KTestData2);
- if(failCount == 3)
+ if(failCount == 14)
{
aClient.ChangeEvent(*event, active->iStatus);
active->StartL();
@@ -732,7 +739,8 @@
continue;
}
- __FILE_FAILNEXT(++failCount);
+ TheTest.Printf(_L("%d \r"), failCount);
+ __FILE_FAILNEXT(KErrNoMemory, failCount++);
aClient.ChangeEvent(*event, active->iStatus);
@@ -745,13 +753,13 @@
__FILE_RESET;
- if (error == KErrGeneral)
+ if (error == KErrNoMemory)
{
active->StartL();
aClient.GetEvent(*event, active->iStatus);
CActiveScheduler::Start();
if (active->iStatus != KErrNone)
- TheTest.Printf(_L("error code:%d failcount:%d\n"),active->iStatus.Int(),failCount);
+ TheTest.Printf(_L("\nerror code:%d failcount:%d\n"),active->iStatus.Int(),failCount);
TEST2(active->iStatus.Int(), KErrNone);
TEST(event->Id() == 0);
@@ -794,7 +802,7 @@
TEST(event->Data() == KTestData2);
CleanupStack::PopAndDestroy(2); // event, active
- TheTest.Printf(_L("The test has succeeded at iteration %d\n"), failCount);
+ TheTest.Printf(_L("\r\nThe test has succeeded at iteration %d\n"), failCount);
}
/**
@@ -826,7 +834,7 @@
{
error = KErrNone;
- if(failCount == 6)
+ if(failCount == 10)
{
aClient.DeleteEvent(0, active->iStatus);
active->StartL();
@@ -836,7 +844,8 @@
continue;
}
- __FILE_FAILNEXT(++failCount);
+ TheTest.Printf(_L("%d \r"), failCount);
+ __FILE_FAILNEXT(KErrNoMemory, failCount++);
aClient.DeleteEvent(0, active->iStatus);
@@ -850,7 +859,7 @@
__FILE_RESET;
- if (error == KErrGeneral)
+ if (error == KErrNoMemory)
{
active->StartL();
aClient.GetEvent(*event, active->iStatus);
@@ -867,7 +876,7 @@
TEST2(active->iStatus.Int(), KErrNotFound);
CleanupStack::PopAndDestroy(2); // event, active
- TheTest.Printf(_L("The test has succeeded at iteration %d\n"), failCount);
+ TheTest.Printf(_L("\r\nThe test has succeeded at iteration %d\n"), failCount);
}
/**
@@ -897,7 +906,8 @@
while(!finished)
{
- __FILE_FAILNEXT(++failCount);
+ TheTest.Printf(_L("%d \r"), failCount);
+ __FILE_FAILNEXT(KErrNoMemory, failCount++);
aClient.GetConfig(config, active->iStatus);
active->StartL();
@@ -906,7 +916,7 @@
if (active->iStatus == KErrNone)
finished = ETrue;
else
- TEST2(active->iStatus.Int(), KErrGeneral);
+ TEST2(active->iStatus.Int(), KErrNoMemory);
__FILE_RESET;
}
@@ -916,7 +926,7 @@
TEST(config.iMaxRecentLogSize > 0);
CleanupStack::PopAndDestroy(); // active
- TheTest.Printf(_L("The test has succeeded at iteration %d\n"), failCount);
+ TheTest.Printf(_L("\r\nThe test has succeeded at iteration %d\n"), failCount);
}
/**
@@ -956,7 +966,7 @@
config.iMaxRecentLogSize = KTestMaxRecentLogSize;
config.iMaxEventAge = KTestMaxEventAge;
- if(failCount == 4)
+ if(failCount == 11)
{
aClient.ChangeConfig(config, active->iStatus);
active->StartL();
@@ -966,7 +976,8 @@
continue;
}
- __FILE_FAILNEXT(++failCount);
+ TheTest.Printf(_L("%d \r"), failCount);
+ __FILE_FAILNEXT(KErrNoMemory, failCount++);
aClient.ChangeConfig(config, active->iStatus);
@@ -980,7 +991,7 @@
__FILE_RESET;
- if (error == KErrGeneral)
+ if (error == KErrNoMemory)
{
active->StartL();
aClient.GetConfig(config, active->iStatus);
@@ -1000,7 +1011,7 @@
TEST(config.iMaxEventAge == KTestMaxEventAge);
CleanupStack::PopAndDestroy(); // active
- TheTest.Printf(_L("The test has succeeded at iteration %d\n"), failCount);
+ TheTest.Printf(_L("\r\nThe test has succeeded at iteration %d\n"), failCount);
}
/**
@@ -1024,7 +1035,8 @@
while(!finished)
{
- __FILE_FAILNEXT(++failCount);
+ TheTest.Printf(_L("%d \r"), failCount);
+ __FILE_FAILNEXT(KErrNoMemory, failCount++);
error = aClient.GetString(str, R_LOG_DIR_IN);
@@ -1037,11 +1049,11 @@
}
else
{
- TEST2(error, KErrGeneral);
+ TEST2(error, KErrNoMemory);
TEST(str.Length() == 0);
}
}
- TheTest.Printf(_L("The test has succeeded at iteration %d\n"), failCount);
+ TheTest.Printf(_L("\r\nThe test has succeeded at iteration %d\n"), failCount);
}
/**
@@ -1144,7 +1156,8 @@
while(!finished)
{
- __FILE_FAILNEXT(++failCount);
+ TheTest.Printf(_L("%d \r"), failCount);
+ __FILE_FAILNEXT(KErrNoMemory, failCount++);
#ifdef SYMBIAN_ENABLE_EVENTLOGGER_DUALSIM
if(aUseSimId)
@@ -1165,7 +1178,7 @@
if (active->iStatus == KErrNone)
finished = ETrue;
else
- TEST2(active->iStatus.Int(), KErrGeneral);
+ TEST2(active->iStatus.Int(), KErrNoMemory);
}
active->StartL();
@@ -1206,7 +1219,7 @@
TEST2(active->iStatus.Int(), KErrNotFound);
CleanupStack::PopAndDestroy(5); // event4, event3, event2, event1, active
- TheTest.Printf(_L("The test has succeeded at iteration %d\n"), failCount);
+ TheTest.Printf(_L("\r\nThe test has succeeded at iteration %d\n"), failCount);
}
void doTestsL()
@@ -1216,7 +1229,7 @@
TheTest.Start(_L("Construction + create db"));
TestUtils::DeleteDatabaseL();
TestConstructionL(); // Creates database
- TheTest.Next(_L("Construction + open db"));
+ TheTest.Next(_L("Construction + open db"));
TestConstructionL(); // Opens existing database
TestUtils::DeleteDatabaseL();
theLog.Write(_L8("Test 1 OK\n"));
--- a/loggingservices/eventlogger/test/src/t_loghicaphelper.cpp Fri May 14 17:36:33 2010 +0300
+++ b/loggingservices/eventlogger/test/src/t_loghicaphelper.cpp Thu May 27 14:29:47 2010 +0300
@@ -149,7 +149,7 @@
//This eventually calls CLogBackup::ChangeFileLockL(..) which closes the database
//file and notifies all handles to that file that it has closed.
backup->CloseFileL(KLogDatabaseName, MBackupObserver::EReleaseLockNoAccess);
- User::After(1000000);
+ User::After(300000);
//Since the log engine database file is closed we can replace it.
//Once this file is deleted, the backup server notices this and attempts to reopen
@@ -387,7 +387,7 @@
//This eventually calls CLogBackup::ChangeFileLockL(..) which closes the database
//file and notifies all handles to that file that it has closed.
backup->CloseFileL(aDbPath, MBackupObserver::EReleaseLockNoAccess);
- User::After(1000000);
+ User::After(300000);
}
//Since the log engine database file is closed we can delete it.
--- a/loggingservices/eventlogger/test/src/t_logviewfail2.cpp Fri May 14 17:36:33 2010 +0300
+++ b/loggingservices/eventlogger/test/src/t_logviewfail2.cpp Thu May 27 14:29:47 2010 +0300
@@ -65,7 +65,8 @@
while(!finished)
{
- __FILE_FAILNEXT(++failCount);
+ TheTest.Printf(_L("%d \r"), failCount);
+ __FILE_FAILNEXT(KErrNoMemory, failCount++);
TBool result = EFalse;
TRAP(error, result = view->SetFilterL(*filter, active->iStatus));
@@ -86,25 +87,25 @@
}
else
{
- if(active->iStatus.Int() != KErrGeneral)
+ if(active->iStatus.Int() != KErrNoMemory)
{
- TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, active->iStatus.Int());
+ TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, active->iStatus.Int());
}
- TEST2(active->iStatus.Int(), KErrGeneral);
+ TEST2(active->iStatus.Int(), KErrNoMemory);
}
}
else
{
- if(error != KErrGeneral)
+ if(error != KErrNoMemory)
{
- TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, error);
+ TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, error);
}
- TEST2(error, KErrGeneral);
+ TEST2(error, KErrNoMemory);
}
__FILE_RESET;
}
- TheTest.Printf(_L("Test-1 has succeeded at iteration %d\n"), failCount);
+ TheTest.Printf(_L("\r\nTest-1 has succeeded at iteration %d\n"), failCount);
list->AppendL(filter);
CleanupStack::Pop(); // filter
@@ -120,7 +121,8 @@
while(!finished)
{
- __FILE_FAILNEXT(++failCount);
+ TheTest.Printf(_L("%d \r"), failCount);
+ __FILE_FAILNEXT(KErrNoMemory, failCount++);
TBool result = EFalse;
TRAP(error, result = view->SetFilterL(*list, active->iStatus));
@@ -141,20 +143,20 @@
}
else
{
- if(active->iStatus.Int() != KErrGeneral)
+ if(active->iStatus.Int() != KErrNoMemory)
{
- TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, active->iStatus.Int());
+ TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, active->iStatus.Int());
}
- TEST2(active->iStatus.Int(), KErrGeneral);
+ TEST2(active->iStatus.Int(), KErrNoMemory);
}
}
else
{
- if(error != KErrGeneral)
+ if(error != KErrNoMemory)
{
- TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, error);
+ TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, error);
}
- TEST2(error, KErrGeneral);
+ TEST2(error, KErrNoMemory);
}
__FILE_RESET;
@@ -163,7 +165,7 @@
list->ResetAndDestroy();
CleanupStack::PopAndDestroy(4); // list, view, event, active
- TheTest.Printf(_L("Test-2 has succeeded at iteration %d\n"), failCount);
+ TheTest.Printf(_L("\r\nTest-2 has succeeded at iteration %d\n"), failCount);
}
/**
@@ -206,7 +208,8 @@
while(!finished)
{
- __FILE_FAILNEXT(++failCount);
+ TheTest.Printf(_L("%d \r"), failCount);
+ __FILE_FAILNEXT(KErrNoMemory, failCount++);
TBool result = EFalse;
TRAP(error, result = view->SetRecentListL(KLogRecentIncomingCalls, active->iStatus));
@@ -225,25 +228,25 @@
}
else
{
- if(active->iStatus.Int() != KErrGeneral)
+ if(active->iStatus.Int() != KErrNoMemory)
{
- TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, active->iStatus.Int());
+ TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, active->iStatus.Int());
}
- TEST2(active->iStatus.Int(), KErrGeneral);
+ TEST2(active->iStatus.Int(), KErrNoMemory);
}
}
else
{
- if(error != KErrGeneral)
+ if(error != KErrNoMemory)
{
- TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, error);
+ TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, error);
}
- TEST2(error, KErrGeneral);
+ TEST2(error, KErrNoMemory);
}
__FILE_RESET;
}
- TheTest.Printf(_L("Test-1 has succeeded at iteration %d\n"), failCount);
+ TheTest.Printf(_L("\r\nTest-1 has succeeded at iteration %d\n"), failCount);
CLogFilterList* list = new(ELeave)CLogFilterList;
CleanupStack::PushL(list);
@@ -257,7 +260,8 @@
while(!finished)
{
- __FILE_FAILNEXT(++failCount);
+ TheTest.Printf(_L("%d \r"), failCount);
+ __FILE_FAILNEXT(KErrNoMemory, failCount++);
TBool result = EFalse;
TRAP(error, result = view->SetRecentListL(KLogRecentIncomingCalls, *filter, active->iStatus));
@@ -276,25 +280,25 @@
}
else
{
- if(active->iStatus.Int() != KErrGeneral)
+ if(active->iStatus.Int() != KErrNoMemory)
{
- TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, active->iStatus.Int());
+ TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, active->iStatus.Int());
}
- TEST2(active->iStatus.Int(), KErrGeneral);
+ TEST2(active->iStatus.Int(), KErrNoMemory);
}
}
else
{
- if(error != KErrGeneral)
+ if(error != KErrNoMemory)
{
- TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, error);
+ TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, error);
}
- TEST2(error, KErrGeneral);
+ TEST2(error, KErrNoMemory);
}
__FILE_RESET;
}
- TheTest.Printf(_L("Test-2 has succeeded at iteration %d\n"), failCount);
+ TheTest.Printf(_L("\r\nTest-2 has succeeded at iteration %d\n"), failCount);
list->AppendL(filter);
CleanupStack::Pop(); // filter
@@ -310,7 +314,8 @@
while(!finished)
{
- __FILE_FAILNEXT(++failCount);
+ TheTest.Printf(_L("%d \r"), failCount);
+ __FILE_FAILNEXT(KErrNoMemory, failCount++);
TBool result = EFalse;
TRAP(error, result = view->SetRecentListL(KLogRecentIncomingCalls, *list, active->iStatus));
@@ -329,20 +334,20 @@
}
else
{
- if(active->iStatus.Int() != KErrGeneral)
+ if(active->iStatus.Int() != KErrNoMemory)
{
- TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, active->iStatus.Int());
+ TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, active->iStatus.Int());
}
- TEST2(active->iStatus.Int(), KErrGeneral);
+ TEST2(active->iStatus.Int(), KErrNoMemory);
}
}
else
{
- if(error != KErrGeneral)
+ if(error != KErrNoMemory)
{
- TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, error);
+ TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, error);
}
- TEST2(error, KErrGeneral);
+ TEST2(error, KErrNoMemory);
}
__FILE_RESET;
@@ -351,7 +356,7 @@
list->ResetAndDestroy();
CleanupStack::PopAndDestroy(4); // list, view, event, active
- TheTest.Printf(_L("Test-3 has succeeded at iteration %d\n"), failCount);
+ TheTest.Printf(_L("\r\nTest-3 has succeeded at iteration %d\n"), failCount);
}
/**
@@ -409,7 +414,8 @@
while(!finished)
{
- __FILE_FAILNEXT(++failCount);
+ TheTest.Printf(_L("%d \r"), failCount);
+ __FILE_FAILNEXT(KErrNoMemory, failCount++);
TBool result = EFalse;
TRAP(error, result = view->DuplicatesL(*duplicate, active->iStatus));
@@ -428,25 +434,25 @@
}
else
{
- if(active->iStatus.Int() != KErrGeneral)
+ if(active->iStatus.Int() != KErrNoMemory)
{
- TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, active->iStatus.Int());
+ TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, active->iStatus.Int());
}
- TEST2(active->iStatus.Int(), KErrGeneral);
+ TEST2(active->iStatus.Int(), KErrNoMemory);
}
}
else
{
- if(error != KErrGeneral)
+ if(error != KErrNoMemory)
{
- TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, error);
+ TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, error);
}
- TEST2(error, KErrGeneral);
+ TEST2(error, KErrNoMemory);
}
__FILE_RESET;
}
- TheTest.Printf(_L("Test-1 has succeeded at iteration %d\n"), failCount);
+ TheTest.Printf(_L("\r\nTest-1 has succeeded at iteration %d\n"), failCount);
CLogFilterList* list = new(ELeave)CLogFilterList;
CleanupStack::PushL(list);
@@ -460,7 +466,8 @@
while(!finished)
{
- __FILE_FAILNEXT(++failCount);
+ TheTest.Printf(_L("%d \r"), failCount);
+ __FILE_FAILNEXT(KErrNoMemory, failCount++);
TBool result = EFalse;
TRAP(error, result = view->DuplicatesL(*duplicate, *filter, active->iStatus));
@@ -479,25 +486,25 @@
}
else
{
- if(active->iStatus.Int() != KErrGeneral)
+ if(active->iStatus.Int() != KErrNoMemory)
{
- TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, active->iStatus.Int());
+ TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, active->iStatus.Int());
}
- TEST2(active->iStatus.Int(), KErrGeneral);
+ TEST2(active->iStatus.Int(), KErrNoMemory);
}
}
else
{
- if(error != KErrGeneral)
+ if(error != KErrNoMemory)
{
- TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, error);
+ TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, error);
}
- TEST2(error, KErrGeneral);
+ TEST2(error, KErrNoMemory);
}
__FILE_RESET;
}
- TheTest.Printf(_L("Test-2 has succeeded at iteration %d\n"), failCount);
+ TheTest.Printf(_L("\r\nTest-2 has succeeded at iteration %d\n"), failCount);
list->AppendL(filter);
CleanupStack::Pop(); // filter
@@ -513,7 +520,8 @@
while(!finished)
{
- __FILE_FAILNEXT(++failCount);
+ TheTest.Printf(_L("%d \r"), failCount);
+ __FILE_FAILNEXT(KErrNoMemory, failCount++);
TBool result = EFalse;
TRAP(error, result = view->DuplicatesL(*duplicate, *list, active->iStatus));
@@ -532,20 +540,20 @@
}
else
{
- if(active->iStatus.Int() != KErrGeneral)
+ if(active->iStatus.Int() != KErrNoMemory)
{
- TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, active->iStatus.Int());
+ TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, active->iStatus.Int());
}
- TEST2(active->iStatus.Int(), KErrGeneral);
+ TEST2(active->iStatus.Int(), KErrNoMemory);
}
}
else
{
- if(error != KErrGeneral)
+ if(error != KErrNoMemory)
{
- TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, error);
+ TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, error);
}
- TEST2(error, KErrGeneral);
+ TEST2(error, KErrNoMemory);
}
__FILE_RESET;
@@ -554,7 +562,7 @@
list->ResetAndDestroy();
CleanupStack::PopAndDestroy(5); // list, duplicate, view, event, active
- TheTest.Printf(_L("Test-3 has succeeded at iteration %d\n"), failCount);
+ TheTest.Printf(_L("\r\nTest-3 has succeeded at iteration %d\n"), failCount);
}
/**
@@ -601,7 +609,8 @@
TEST(view->CountL() > 1);
event->CopyL(view->Event());
- __FILE_FAILNEXT(++failCount);
+ TheTest.Printf(_L("%d \r"), failCount);
+ __FILE_FAILNEXT(KErrNoMemory, failCount++);
TBool result = EFalse;
TRAP(error, result = view->NextL(active->iStatus));
@@ -620,25 +629,25 @@
}
else
{
- if(active->iStatus.Int() != KErrGeneral)
+ if(active->iStatus.Int() != KErrNoMemory)
{
- TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, active->iStatus.Int());
+ TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, active->iStatus.Int());
}
- TEST2(active->iStatus.Int(), KErrGeneral);
+ TEST2(active->iStatus.Int(), KErrNoMemory);
}
}
else
{
- if(error != KErrGeneral)
+ if(error != KErrNoMemory)
{
- TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, error);
+ TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, error);
}
- TEST2(error, KErrGeneral);
+ TEST2(error, KErrNoMemory);
}
__FILE_RESET;
}
- TheTest.Printf(_L("Test-1 (\"View Next\") has succeeded at iteration %d\n"), failCount);
+ TheTest.Printf(_L("\r\nTest-1 (\"View Next\") has succeeded at iteration %d\n"), failCount);
failCount = 0;
finished = EFalse;
@@ -658,7 +667,8 @@
event->CopyL(view->Event());
- __FILE_FAILNEXT(++failCount);
+ TheTest.Printf(_L("%d \r"), failCount);
+ __FILE_FAILNEXT(KErrNoMemory, failCount++);
TBool result = EFalse;
TRAP(error, result = view->PreviousL(active->iStatus));
@@ -677,25 +687,25 @@
}
else
{
- if(active->iStatus.Int() != KErrGeneral)
+ if(active->iStatus.Int() != KErrNoMemory)
{
- TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, active->iStatus.Int());
+ TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, active->iStatus.Int());
}
- TEST2(active->iStatus.Int(), KErrGeneral);
+ TEST2(active->iStatus.Int(), KErrNoMemory);
}
}
else
{
- if(error != KErrGeneral)
+ if(error != KErrNoMemory)
{
- TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, error);
+ TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, error);
}
- TEST2(error, KErrGeneral);
+ TEST2(error, KErrNoMemory);
}
__FILE_RESET;
}
- TheTest.Printf(_L("Test-2 (\"View Previous\") has succeeded at iteration %d\n"), failCount);
+ TheTest.Printf(_L("\r\nTest-2 (\"View Previous\") has succeeded at iteration %d\n"), failCount);
failCount = 0;
finished = EFalse;
@@ -715,7 +725,8 @@
event->CopyL(view->Event());
- __FILE_FAILNEXT(++failCount);
+ TheTest.Printf(_L("%d \r"), failCount);
+ __FILE_FAILNEXT(KErrNoMemory, failCount++);
TBool result = EFalse;
TRAP(error, result = view->FirstL(active->iStatus));
@@ -734,25 +745,25 @@
}
else
{
- if(active->iStatus.Int() != KErrGeneral)
+ if(active->iStatus.Int() != KErrNoMemory)
{
- TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, active->iStatus.Int());
+ TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, active->iStatus.Int());
}
- TEST2(active->iStatus.Int(), KErrGeneral);
+ TEST2(active->iStatus.Int(), KErrNoMemory);
}
}
else
{
- if(error != KErrGeneral)
+ if(error != KErrNoMemory)
{
- TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, error);
+ TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, error);
}
- TEST2(error, KErrGeneral);
+ TEST2(error, KErrNoMemory);
}
__FILE_RESET;
}
- TheTest.Printf(_L("Test-3 (\"View First\") has succeeded at iteration %d\n"), failCount);
+ TheTest.Printf(_L("\r\nTest-3 (\"View First\") has succeeded at iteration %d\n"), failCount);
failCount = 0;
finished = EFalse;
@@ -772,7 +783,8 @@
event->CopyL(view->Event());
- __FILE_FAILNEXT(++failCount);
+ TheTest.Printf(_L("%d \r"), failCount);
+ __FILE_FAILNEXT(KErrNoMemory, failCount++);
TBool result = EFalse;
TRAP(error, result = view->LastL(active->iStatus));
@@ -791,20 +803,20 @@
}
else
{
- if(active->iStatus.Int() != KErrGeneral)
+ if(active->iStatus.Int() != KErrNoMemory)
{
- TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, active->iStatus.Int());
+ TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, active->iStatus.Int());
}
- TEST2(active->iStatus.Int(), KErrGeneral);
+ TEST2(active->iStatus.Int(), KErrNoMemory);
}
}
else
{
- if(error != KErrGeneral)
+ if(error != KErrNoMemory)
{
- TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, error);
+ TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, error);
}
- TEST2(error, KErrGeneral);
+ TEST2(error, KErrNoMemory);
}
__FILE_RESET;
@@ -812,7 +824,7 @@
CleanupStack::PopAndDestroy(4); // filter, view, event, active
- TheTest.Printf(_L("Test-4 (\"View Last\") has succeeded at iteration %d\n"), failCount);
+ TheTest.Printf(_L("\r\nTest-4 (\"View Last\") has succeeded at iteration %d\n"), failCount);
}
/**
@@ -856,7 +868,8 @@
while(!finished)
{
- __FILE_FAILNEXT(++failCount);
+ TheTest.Printf(_L("%d \r"), failCount);
+ __FILE_FAILNEXT(KErrNoMemory, failCount++);
TInt result = 0;
TRAP(error, result = view->CountL());
@@ -868,11 +881,11 @@
}
else
{
- if(error != KErrGeneral)
+ if(error != KErrNoMemory)
{
- TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, error);
+ TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, error);
}
- TEST2(error, KErrGeneral);
+ TEST2(error, KErrNoMemory);
}
__FILE_RESET;
@@ -880,7 +893,7 @@
CleanupStack::PopAndDestroy(4); // filter, view, event, active
- TheTest.Printf(_L("The test (\"View Count\") has succeeded at iteration %d\n"), failCount);
+ TheTest.Printf(_L("\r\nThe test (\"View Count\") has succeeded at iteration %d\n"), failCount);
}
/**
@@ -943,14 +956,9 @@
while(!finished)
{
- // This failCount value causes DBMS to return KErrCorrupt. Apparently this
- // can't actually occur in real life, so we skip this value.
- if (failCount == 9 || failCount == 14)
- {
- failCount++;
- }
- __FILE_FAILNEXT(++failCount);
-
+ TheTest.Printf(_L("%d \r"), failCount);
+ __FILE_FAILNEXT(KErrNoMemory, failCount++);
+
TRAP(error, view->RemoveL(view->Event().Id()));
__FILE_RESET;
@@ -964,7 +972,7 @@
CActiveScheduler::Start();
if(active->iStatus.Int() != KErrNone)
{
- TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, active->iStatus.Int());
+ TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, active->iStatus.Int());
}
TEST2(active->iStatus.Int(), KErrNone);
@@ -972,16 +980,24 @@
}
else
{
- if(error != KErrGeneral)
+ if(error != KErrNoMemory)
{
- TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, error);
+ TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, error);
}
- TEST2(error, KErrGeneral);
+ TEST2(error, KErrNoMemory);
+ }
+ // This failCount value causes DBMS to return KErrCorrupt. Apparently this
+ // can't actually occur in real life, so we skip this value.
+ if (failCount > 9)
+ {
+ finished = ETrue;
+ TRAP(error, view->RemoveL(view->Event().Id()));
+ TEST2(error, KErrNone);
}
}
CleanupStack::PopAndDestroy(3); // view, event, active
- TheTest.Printf(_L("The test (\"View Remove\") has succeeded at iteration %d\n"), failCount);
+ TheTest.Printf(_L("\r\nThe test (\"View Remove\") has succeeded at iteration %d\n"), failCount);
}
/**
@@ -1055,14 +1071,15 @@
while(!finished)
{
- __FILE_FAILNEXT(++failCount);
+ TheTest.Printf(_L("%d \r"), failCount);
+ __FILE_FAILNEXT(KErrNoMemory, failCount++);
- if(failCount == 7)
+ if(failCount == 17)
{
__FILE_RESET;
break;
}
-
+
TRAP(error, duplicate->RemoveL(duplicate->Event().Id()));
__FILE_RESET;
@@ -1076,7 +1093,7 @@
CActiveScheduler::Start();
if(active->iStatus.Int() != KErrNone)
{
- TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, active->iStatus.Int());
+ TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, active->iStatus.Int());
}
TEST2(active->iStatus.Int(), KErrNone);
@@ -1084,16 +1101,16 @@
}
else
{
- if(error != KErrGeneral)
+ if(error != KErrNoMemory)
{
- TheTest.Printf(_L("Iter.step: %d, error %d\n"), failCount, error);
+ TheTest.Printf(_L("\r\nIter.step: %d, error %d\n"), failCount, error);
}
- TEST2(error, KErrGeneral);
+ TEST2(error, KErrNoMemory);
}
}
CleanupStack::PopAndDestroy(4); // duplicate, view, event, active
- TheTest.Printf(_L("The test (\"View Remove Duplicates\") has succeeded at iteration %d\n"), failCount);
+ TheTest.Printf(_L("\r\nThe test (\"View Remove Duplicates\") has succeeded at iteration %d\n"), failCount);
}
void doTestsL()
--- a/loggingservices/eventlogger/test/src/t_logwrap.cpp Fri May 14 17:36:33 2010 +0300
+++ b/loggingservices/eventlogger/test/src/t_logwrap.cpp Thu May 27 14:29:47 2010 +0300
@@ -277,7 +277,8 @@
while(!finished)
{
- __FILE_FAILNEXT(failCount++);
+ TheTest.Printf(_L("%d \r"), failCount);
+ __FILE_FAILNEXT(KErrNoMemory, failCount++);
TRAP(error, wrapper = CLogWrapper::NewL(theFs));
@@ -291,8 +292,11 @@
delete wrapper;
}
else
- TEST2(error, KErrGeneral);
+ {
+ TEST2(error, KErrNoMemory);
+ }
}
+ TheTest.Printf(_L("\r\nThe test has succeeded at iteration %d\n"), failCount);
}
/**
--- a/persistentstorage/centralrepository/cenrepsrv/install.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/centralrepository/cenrepsrv/install.cpp Thu May 27 14:29:47 2010 +0300
@@ -73,8 +73,11 @@
CCentRepSWIWatcher::~CCentRepSWIWatcher()
{
Cancel();
- iSWIKey.Cancel();
- iSWIKey.Close();
+ if(iSWIKey.Handle() != KNullHandle)
+ {
+ iSWIKey.Cancel();
+ iSWIKey.Close();
+ }
iInstallEntryArray.ResetAndDestroy();
iCurrentInstallDirEntries.ResetAndDestroy();
}
--- a/persistentstorage/centralrepository/group/bld.inf Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/centralrepository/group/bld.inf Thu May 27 14:29:47 2010 +0300
@@ -39,7 +39,12 @@
PRJ_TESTEXPORTS
// Stub sis file required by various tests.
-../test/testexecute/SWI/data/centrepswiteststub.SIS z:/system/install/centrepswiteststub.sis
+
+#ifdef __SERIES60_
+../test/testexecute/SWI/data/rnd_sis/centrepswiteststub.SIS z:/system/install/centrepswiteststub.sis
+#else
+../test/testexecute/SWI/data/techview_sis/centrepswiteststub.SIS z:/system/install/centrepswiteststub.sis
+#endif //__SERIES60_
CentralRepositoryTests.bat /epoc32/data/z/system/test/centralrepositorytests.bat
centrepswiteststub.iby /epoc32/rom/include/centrepswiteststub.iby
@@ -170,10 +175,18 @@
../test/sw.txt z:/resource/versions/sw.txt
../test/00000003.txt z:/private/102081e4/00000003.txt
../test/00112273.txt z:/private/10202be9/00112273.txt
-../test/RF1.sis z:/private/10202be9/rf1.sis
-../test/RF2.sis z:/private/10202be9/rf2.sis
-../test/RF3.sis z:/private/10202be9/rf3.sis
-../test/RF4.sis z:/private/10202be9/rf4.sis
+
+#ifdef __SERIES60_
+../test/rnd_RF1.sis z:/private/10202be9/rf1.sis
+../test/rnd_RF2.sis z:/private/10202be9/rf2.sis
+../test/rnd_RF3.sis z:/private/10202be9/rf3.sis
+../test/rnd_RF4.sis z:/private/10202be9/rf4.sis
+#else
+../test/techview_RF1.sis z:/private/10202be9/rf1.sis
+../test/techview_RF2.sis z:/private/10202be9/rf2.sis
+../test/techview_RF3.sis z:/private/10202be9/rf3.sis
+../test/techview_RF4.sis z:/private/10202be9/rf4.sis
+#endif //__SERIES60_
#ifdef SYMBIAN_CENTREP_SUPPORT_MULTIROFS
// Multi Rofs testing
Binary file persistentstorage/centralrepository/test/RF1.sis has changed
Binary file persistentstorage/centralrepository/test/RF2.sis has changed
Binary file persistentstorage/centralrepository/test/RF3.sis has changed
Binary file persistentstorage/centralrepository/test/RF4.sis has changed
--- a/persistentstorage/centralrepository/test/doflashsis.bat Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/centralrepository/test/doflashsis.bat Thu May 27 14:29:47 2010 +0300
@@ -19,13 +19,21 @@
rem Make and sign the RF1 package.
makesis RF1.pkg
-signsis -S RF1.sis RF1.sis testexecute\SWI\data\certstore\centreproot.pem testexecute\SWI\data\certstore\centreproot.key
+makesis RF2.pkg
+makesis RF3.pkg
+makesis RF4.pkg
-makesis RF2.pkg
-signsis -S RF2.sis RF2.sis testexecute\SWI\data\certstore\centreproot.pem testexecute\SWI\data\certstore\centreproot.key
+signsis -S RF1.sis techview_RF1.sis testexecute\SWI\data\certstore\centreproot.pem testexecute\SWI\data\certstore\centreproot.key
+signsis -S RF2.sis techview_RF2.sis testexecute\SWI\data\certstore\centreproot.pem testexecute\SWI\data\certstore\centreproot.key
+signsis -S RF3.sis techview_RF3.sis testexecute\SWI\data\certstore\centreproot.pem testexecute\SWI\data\certstore\centreproot.key
+signsis -S RF4.sis techview_RF4.sis testexecute\SWI\data\certstore\centreproot.pem testexecute\SWI\data\certstore\centreproot.key
-makesis RF3.pkg
-signsis -S RF3.sis RF3.sis testexecute\SWI\data\certstore\centreproot.pem testexecute\SWI\data\certstore\centreproot.key
+signsis -S RF1.sis rnd_RF1.sis testexecute\SWI\data\certstore\Nokia_RnDCert_02.der testexecute\SWI\data\certstore\Nokia_RnDCert_02.key
+signsis -S RF2.sis rnd_RF2.sis testexecute\SWI\data\certstore\Nokia_RnDCert_02.der testexecute\SWI\data\certstore\Nokia_RnDCert_02.key
+signsis -S RF3.sis rnd_RF3.sis testexecute\SWI\data\certstore\Nokia_RnDCert_02.der testexecute\SWI\data\certstore\Nokia_RnDCert_02.key
+signsis -S RF4.sis rnd_RF4.sis testexecute\SWI\data\certstore\Nokia_RnDCert_02.der testexecute\SWI\data\certstore\Nokia_RnDCert_02.key
-makesis RF4.pkg
-signsis -S RF4.sis RF4.sis testexecute\SWI\data\certstore\centreproot.pem testexecute\SWI\data\certstore\centreproot.key
+del /f RF1.sis
+del /f RF2.sis
+del /f RF3.sis
+del /f RF4.sis
Binary file persistentstorage/centralrepository/test/rnd_rf1.sis has changed
Binary file persistentstorage/centralrepository/test/rnd_rf2.sis has changed
Binary file persistentstorage/centralrepository/test/rnd_rf3.sis has changed
Binary file persistentstorage/centralrepository/test/rnd_rf4.sis has changed
--- a/persistentstorage/centralrepository/test/t_cenrep_back_rest.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/centralrepository/test/t_cenrep_back_rest.cpp Thu May 27 14:29:47 2010 +0300
@@ -13,13 +13,9 @@
// Description:
//
-//#include <centralrepository.h>
#include <e32test.h>
#include <f32file.h>
#include <badesca.h>
-#include <connect/sbdefs.h>
-#include <connect/sbeclient.h>
-
#include "srvrepos_noc.h"
#include "srvres.h"
#include "cachemgr.h"
--- a/persistentstorage/centralrepository/test/t_cenrep_back_rest_delete.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/centralrepository/test/t_cenrep_back_rest_delete.cpp Thu May 27 14:29:47 2010 +0300
@@ -17,9 +17,6 @@
#include <e32test.h>
#include <f32file.h>
#include <badesca.h>
-#include <connect/sbdefs.h>
-#include <connect/sbeclient.h>
-
#include "srvrepos_noc.h"
#include "srvres.h"
#include "cachemgr.h"
--- a/persistentstorage/centralrepository/test/t_cenrep_rfs.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/centralrepository/test/t_cenrep_rfs.cpp Thu May 27 14:29:47 2010 +0300
@@ -73,6 +73,17 @@
#define TEST(arg) ::CheckL((arg), __LINE__)
#define TEST2(aValue, aExpected) ::CheckL(aValue, aExpected, __LINE__)
+// This function kills the C32exe.exe process. This commsdat process will
+// interfere with the test if not killed. In a nutshell, some of the test cases
+// will kill and then wait for 2 seconds and restart the centrep server
+// with --SoftReset option. During that 2 seconds wait sometimes C32exe.exe
+// will use centrep API, thus starting the server normally without --SoftReset.
+LOCAL_C void KillC32Exe()
+ {
+ _LIT( KC32ServerName, "c32exe");
+ KillProcess(KC32ServerName); // Don't need to check the return code, it always return KErrNone anyway.
+ User::After(KGeneralDelay);
+ }
//This function restores the state of the files required for this test
//Existing files are deleted and then the required files are copied
@@ -622,6 +633,7 @@
{
TheTest.Start(_L(" @SYMTestCaseID:SYSLIB-CENTRALREPOSITORY-CT-0497-0001 Restore Factory Settings tests "));
CleanupCDriveL();
+ KillC32Exe(); //Need to kill C32Exe as it is interfering with the test.
RestoreFactorySettingsTestL();
PDEF105203();
RFSRomOnlyL();
Binary file persistentstorage/centralrepository/test/techview_rf1.sis has changed
Binary file persistentstorage/centralrepository/test/techview_rf2.sis has changed
Binary file persistentstorage/centralrepository/test/techview_rf3.sis has changed
Binary file persistentstorage/centralrepository/test/techview_rf4.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/APPXs.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/APPY1s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/APPY2s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/APPYs.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KP12s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KP14s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KP2.SIS has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KP22s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KP23s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KP2s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KP3.SIS has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KP3s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KP41s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KP4s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KP62s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KPS14s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KPS4s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KPS64s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KS12s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KS14s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KS2.SIS has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KS22s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KS2s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KS3s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KS41s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KS4s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KS51s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KS62s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KSDs.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KSY1s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KSY2s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/KSYs.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/centrepswiteststub.SIS has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/certstore/nokia_rndcert_02.der has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/data/certstore/nokia_rndcert_02.key Thu May 27 14:29:47 2010 +0300
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXQIBAAKBgQC/TDP7KKIaf5+uW4OD2iVZuUMC2a+SeQTjf6srlKcOm+CpPNXn
+uLNm/8fdEnyOIuRXPRKmqhs1n0JkxEGHynELWMTuKXbQx9SRAGUXzyneGn+IJNnO
+vOKHWgKCouX2hfI8rtkdqJpqmO460gGsMgw+lsbeyWyW9lnfLxq+ZC7sqQIDAQAB
+AoGBALmUWZE8GBaQ3P4u9WUCSd3DJkkrmXIFSULSZeH/chlwCwDjbbhArHothVzo
+REE3hEFFlERvHbplZ+mNouzy7boduvgUzbksGrbGMLJ2qO1GzWWVwV+GzOWKd3ss
+/98Gwoy5R8pjnkqUE2wP1iJFw0FjvUTKcYv/z6t3LLJ0CsoBAkEA+c7ixvsviQ3J
+s0INytCKU2bf8fqFQJi1VI82ukxNsujGTQ9upVSjuvqPvWyDvvTdrUBHqO+3qPut
+sEh01Q8aiQJBAMQKDJPVRu4ud3mwUfEavzL5EjqwG1k9VCNGYsT4FwtrHcxu1oP/
+pk6M3rIZukqomoEEnHWPMwhrK3fhBqi0OSECQQDr40VXege4FnH5OI2Hj4afHMyp
+VdQQXGMWFyopnzXblFz0lXb43cTCIiorR9XcMqNFHybLypkWE5o+lRzlt55pAkBQ
+P/zeF5Sts//cpL0mgdh7OVKpC6ZmZaCnwAx2rUhhuDu+kDDoYCLoTOps5fNI1LRK
+1GRoC3LMo3Jr5IYhUYWBAkBpCpN6k4JU/mszq98EojHerQNxk8sPqvQKUzTutohT
+1gLX9yepGayB/TtT2EEJDkWOlnTy/dvN6W3vzbJYz97x
+-----END RSA PRIVATE KEY-----
--- a/persistentstorage/centralrepository/test/testexecute/SWI/data/dosis.bat Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/data/dosis.bat Thu May 27 14:29:47 2010 +0300
@@ -1,6 +1,6 @@
@echo off
rem
-rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+rem Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
rem All rights reserved.
rem This component and the accompanying materials are made available
rem under the terms of "Eclipse Public License v1.0"
@@ -15,120 +15,126 @@
rem Description:
rem
@echo on
+
+@if not exist "%1" md "%1"
+@if not exist "%1" goto :InvalidFolder
+@if not exist "%2" goto :MissingCert
+@if not exist "%3" goto :MissingKey
+
rem The stub..
makesis -s centrepswiteststub.pkg
rem Make and sign the KS12 package. This modifies the KS1.2 keyspace, which
rem is a user mod on the ROM keyspace K1.
-makesis KS12.pkg
-signsis -S KS12.sis KS12s.sis certstore\centreproot.pem certstore\centreproot.key
+makesis KS12.pkg KS12.sis
+signsis -S KS12.sis KS12s.sis %2 %3
rem Make and sign the KS14 package.
-makesis KS14.pkg
-signsis -S KS14.sis KS14s.sis certstore\centreproot.pem certstore\centreproot.key
+makesis KS14.pkg KS14.sis
+signsis -S KS14.sis KS14s.sis %2 %3
rem Make and sign the KS2 package. This creates the KS2 keyspace, which
rem is new.
-makesis KS2.pkg
-signsis -S KS2.sis KS2s.sis certstore\centreproot.pem certstore\centreproot.key
+makesis KS2.pkg KS2.sis
+signsis -S KS2.sis KS2s.sis %2 %3
rem Make and sign the KS22 package. This creates the KS22 keyspace, which
rem upgrades KS21 (user modified KS2).
-makesis KS22.pkg
-signsis -S KS22.sis KS22s.sis certstore\centreproot.pem certstore\centreproot.key
+makesis KS22.pkg KS22.sis
+signsis -S KS22.sis KS22s.sis %2 %3
rem Make and sign the KS3 package. This package will fail to install
rem because the referenced keyspace file is not in the ROM stub.
-makesis KS3.pkg
-signsis -S KS3.sis KS3s.sis certstore\centreproot.pem certstore\centreproot.key
+makesis KS3.pkg KS3.sis
+signsis -S KS3.sis KS3s.sis %2 %3
rem Make and sign the KS4 package. This keyspace contains various capabilities
rem which we'll test don't change on a further install.
-makesis KS4.pkg
-signsis -S KS4.sis KS4s.sis certstore\centreproot.pem certstore\centreproot.key
+makesis KS4.pkg KS4.sis
+signsis -S KS4.sis KS4s.sis %2 %3
rem Installs on top of the above, you might think the capabilities in the
rem above would be lost, but no - they are persisted before the caps in this
rem package can splat them.
-makesis KS41.pkg
-signsis -S KS41.sis KS41s.sis certstore\centreproot.pem certstore\centreproot.key
+makesis KS41.pkg KS41.sis
+signsis -S KS41.sis KS41s.sis %2 %3
rem Make and sign the KP4 package. This keyspace contains various capabilities
rem which we'll test don't change on a further install.
-makesis KP4.pkg
-signsis -S KP4.sis KP4s.sis certstore\centreproot.pem certstore\centreproot.key
+makesis KP4.pkg KP4.sis
+signsis -S KP4.sis KP4s.sis %2 %3
rem Installs on top of the above, you might think the capabilities in the
rem above would be lost, but no - they are persisted before the caps in this
rem package can splat them.
-makesis KP41.pkg
-signsis -S KP41.sis KP41s.sis certstore\centreproot.pem certstore\centreproot.key
+makesis KP41.pkg KP41.sis
+signsis -S KP41.sis KP41s.sis %2 %3
rem SP filenull for uninstalling KP4.
-makesis KPS4.pkg
-signsis -S KPS4.sis KPS4s.sis certstore\centreproot.pem certstore\centreproot.key
+makesis KPS4.pkg KPS4.sis
+signsis -S KPS4.sis KPS4s.sis %2 %3
rem Installs on top of the ROM (51551554)
-makesis KS51.pkg
-signsis -S KS51.sis KS51s.sis certstore\centreproot.pem certstore\centreproot.key
+makesis KS51.pkg KS51.sis
+signsis -S KS51.sis KS51s.sis %2 %3
rem Make and sign the KP2 package. This creates the KP2 keyspace, which
rem is new.
-makesis KP2.pkg
-signsis -S KP2.sis KP2s.sis certstore\centreproot.pem certstore\centreproot.key
+makesis KP2.pkg KP2.sis
+signsis -S KP2.sis KP2s.sis %2 %3
rem Make and sign the KP22 package. This creates the KP22 keyspace, which
rem upgrades KP21 (user modified KP2).
-makesis KP22.pkg
-signsis -S KP22.sis KP22s.sis certstore\centreproot.pem certstore\centreproot.key
+makesis KP22.pkg KP22.sis
+signsis -S KP22.sis KP22s.sis %2 %3
rem Make and sign the KP23 package.
-makesis KP23.pkg
-signsis -S KP23.sis KP23s.sis certstore\centreproot.pem certstore\centreproot.key
+makesis KP23.pkg KP23.sis
+signsis -S KP23.sis KP23s.sis %2 %3
rem Make and sign the KP12 package.
-makesis KP12.pkg
-signsis -S KP12.sis KP12s.sis certstore\centreproot.pem certstore\centreproot.key
+makesis KP12.pkg KP12.sis
+signsis -S KP12.sis KP12s.sis %2 %3
rem Make and sign the KP14 package.
-makesis KP14.pkg
-signsis -S KP14.sis KP14s.sis certstore\centreproot.pem certstore\centreproot.key
+makesis KP14.pkg KP14.sis
+signsis -S KP14.sis KP14s.sis %2 %3
rem Make and sign the KPS14 standard patch, this SP is installed with a
rem file-null so the 51551551 keyspace file can be removed.
-makesis KPS14.pkg
-signsis -S KPS14.sis KPS14s.sis certstore\centreproot.pem certstore\centreproot.key
+makesis KPS14.pkg KPS14.sis
+signsis -S KPS14.sis KPS14s.sis %2 %3
rem Make and sign the KP3 package. This package will fail to install
rem because the referenced keyspace file is not in the ROM stub.
-makesis KP3.pkg
-signsis -S KP3.sis KP3s.sis certstore\centreproot.pem certstore\centreproot.key
+makesis KP3.pkg KP3.sis
+signsis -S KP3.sis KP3s.sis %2 %3
rem Make and sign the KP62 package.
-makesis KP62.pkg
-signsis -S KP62.sis KP62s.sis certstore\centreproot.pem certstore\centreproot.key
+makesis KP62.pkg KP62.sis
+signsis -S KP62.sis KP62s.sis %2 %3
rem Make and sign the KP62 package.
-makesis KS62.pkg
-signsis -S KS62.sis KS62s.sis certstore\centreproot.pem certstore\centreproot.key
+makesis KS62.pkg KS62.sis
+signsis -S KS62.sis KS62s.sis %2 %3
rem Make and sign the KPS64 package.
-makesis KPS64.pkg
-signsis -S KPS64.sis KPS64s.sis certstore\centreproot.pem certstore\centreproot.key
+makesis KPS64.pkg KPS64.sis
+signsis -S KPS64.sis KPS64s.sis %2 %3
rem Make and sign the KSX package. This is the embedded sis that goes in AppX.sis
-makesis KSX.pkg
-signsis -S KSX.sis KSXs.sis certstore\centreproot.pem certstore\centreproot.key
+makesis KSX.pkg KSX.sis
+signsis -S KSX.sis KSXs.sis %2 %3
rem Make the AppX package for the application. This is the sis which contains the
rem embedded sis that has the application repository as a Centrep patch. This sis
rem is self-signed and conditonally installs the exe file depending on the environment
-makesis APPX.pkg
+makesis APPX.pkg APPX.sis
signsis -S APPX.sis APPXs.sis certstore\appx.cer certstore\appx.key
rem Make and sign the KSD package. This contains the corrupt KSD keyspace.
-makesis KSD.pkg
-signsis -S KSD.sis KSDs.sis certstore\centreproot.pem certstore\centreproot.key
+makesis KSD.pkg KSD.sis
+signsis -S KSD.sis KSDs.sis %2 %3
rem Make the AppY,1,2 packages for the application. These sis files contain the
rem embedded sis that has the application repository as a Centrep patch. This sis
@@ -138,33 +144,48 @@
rem The following packages are used for the APP-SP test
rem Make and sign the KSY package. This is the embedded PU sis that goes in AppY.sis
-makesis KSY.pkg
-signsis -S KSY.sis KSYs.sis certstore\centreproot.pem certstore\centreproot.key
+makesis KSY.pkg KSY.sis
+signsis -S KSY.sis KSYs.sis %2 %3
rem Make and sign the APPY package. This package will install an APP exe
rem a keyspace in an embedded PU package and an SP package to be used for the uninstall
-makesis APPY.pkg
+makesis APPY.pkg APPY.sis
signsis -S APPY.sis APPYs.sis certstore\appx.cer certstore\appx.key
rem Make and sign the KSY1 package. This is the embedded PU sis that goes in AppY1.sis
-makesis KSY1.pkg
-signsis -S KSY1.sis KSY1s.sis certstore\centreproot.pem certstore\centreproot.key
+makesis KSY1.pkg KSY1.sis
+signsis -S KSY1.sis KSY1s.sis %2 %3
rem Make and sign the APPY1 package. This package will install the APP exe
rem a new version of the keyspace in an embedded PU package and an SP package
rem to be used for the uninstall
-makesis APPY1.pkg
+makesis APPY1.pkg APPY1.sis
signsis -S APPY1.sis APPY1s.sis certstore\appx.cer certstore\appx.key
rem Make and sign the KSY2 package. This is the embedded PU sis that goes in AppY2.sis
-makesis KSY2.pkg
-signsis -S KSY2.sis KSY2s.sis certstore\centreproot.pem certstore\centreproot.key
+makesis KSY2.pkg KSY2.sis
+signsis -S KSY2.sis KSY2s.sis %2 %3
rem Make and sign the APPY2 package. This package will install the APP exe
rem a new version of the keyspace in an embedded PU package and an SP package
rem to be used for the uninstall
-makesis APPY2.pkg
+makesis APPY2.pkg APPY2.sis
signsis -S APPY2.sis APPY2s.sis certstore\appx.cer certstore\appx.key
+echo f | XCOPY /fry *.sis %1\
+del /f *.sis
+@goto :EOF
+
+:InvalidFolder
+@echo ERROR: Can't create folder %1
+@goto :EOF
+
+:MissingCert
+@echo ERROR: Missing certificate %2
+@goto :EOF
+
+:MissingKey
+@echo ERROR: Missing certificate key %3
+@goto :EOF
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/data/logfile.txt Thu May 27 14:29:47 2010 +0300
@@ -0,0 +1,267 @@
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem The stub..
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis -s centrepswiteststub.pkg
+Processing centrepswiteststub.pkg...
+Created centrepswiteststub.sis.
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KS12 package. This modifies the KS1.2 keyspace, which
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem is a user mod on the ROM keyspace K1.
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KS12.pkg
+Processing KS12.pkg...
+Created KS12.sis.
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KS12.sis KS12s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KS14 package.
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KS14.pkg
+Processing KS14.pkg...
+Created KS14.sis.
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KS14.sis KS14s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KS2 package. This creates the KS2 keyspace, which
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem is new.
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KS2.pkg
+Processing KS2.pkg...
+Created KS2.sis.
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KS2.sis KS2s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KS22 package. This creates the KS22 keyspace, which
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem upgrades KS21 (user modified KS2).
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KS22.pkg
+Processing KS22.pkg...
+Created KS22.sis.
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KS22.sis KS22s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KS3 package. This package will fail to install
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem because the referenced keyspace file is not in the ROM stub.
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KS3.pkg
+Processing KS3.pkg...
+Created KS3.sis.
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KS3.sis KS3s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KS4 package. This keyspace contains various capabilities
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem which we'll test don't change on a further install.
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KS4.pkg
+Processing KS4.pkg...
+Created KS4.sis.
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KS4.sis KS4s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Installs on top of the above, you might think the capabilities in the
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem above would be lost, but no - they are persisted before the caps in this
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem package can splat them.
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KS41.pkg
+Processing KS41.pkg...
+Created KS41.sis.
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KS41.sis KS41s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KP4 package. This keyspace contains various capabilities
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem which we'll test don't change on a further install.
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KP4.pkg
+Processing KP4.pkg...
+Created KP4.sis.
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KP4.sis KP4s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Installs on top of the above, you might think the capabilities in the
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem above would be lost, but no - they are persisted before the caps in this
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem package can splat them.
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KP41.pkg
+Processing KP41.pkg...
+Created KP41.sis.
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KP41.sis KP41s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem SP filenull for uninstalling KP4.
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KPS4.pkg
+Processing KPS4.pkg...
+Created KPS4.sis.
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KPS4.sis KPS4s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Installs on top of the ROM (51551554)
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KS51.pkg
+Processing KS51.pkg...
+Created KS51.sis.
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KS51.sis KS51s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KP2 package. This creates the KP2 keyspace, which
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem is new.
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KP2.pkg
+Processing KP2.pkg...
+Created KP2.sis.
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KP2.sis KP2s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KP22 package. This creates the KP22 keyspace, which
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem upgrades KP21 (user modified KP2).
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KP22.pkg
+Processing KP22.pkg...
+Created KP22.sis.
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KP22.sis KP22s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KP23 package.
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KP23.pkg
+Processing KP23.pkg...
+Created KP23.sis.
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KP23.sis KP23s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KP12 package.
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KP12.pkg
+Processing KP12.pkg...
+Created KP12.sis.
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KP12.sis KP12s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KP14 package.
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KP14.pkg
+Processing KP14.pkg...
+Created KP14.sis.
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KP14.sis KP14s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KPS14 standard patch, this SP is installed with a
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem file-null so the 51551551 keyspace file can be removed.
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KPS14.pkg
+Processing KPS14.pkg...
+Created KPS14.sis.
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KPS14.sis KPS14s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KP3 package. This package will fail to install
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem because the referenced keyspace file is not in the ROM stub.
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KP3.pkg
+Processing KP3.pkg...
+Created KP3.sis.
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KP3.sis KP3s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KP62 package.
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KP62.pkg
+Processing KP62.pkg...
+Created KP62.sis.
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KP62.sis KP62s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KP62 package.
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KS62.pkg
+Processing KS62.pkg...
+Created KS62.sis.
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KS62.sis KS62s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KPS64 package.
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KPS64.pkg
+Processing KPS64.pkg...
+Created KPS64.sis.
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KPS64.sis KPS64s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KSX package. This is the embedded sis that goes in AppX.sis
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KSX.pkg
+Processing KSX.pkg...
+Created KSX.sis.
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KSX.sis KSXs.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make the AppX package for the application. This is the sis which contains the
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem embedded sis that has the application repository as a Centrep patch. This sis
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem is self-signed and conditonally installs the exe file depending on the environment
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis APPX.pkg
+Processing APPX.pkg...
+Created APPX.sis.
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S APPX.sis APPXs.sis certstore\appx.cer certstore\appx.key
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KSD package. This contains the corrupt KSD keyspace.
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KSD.pkg
+Processing KSD.pkg...
+Created KSD.sis.
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KSD.sis KSDs.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make the AppY,1,2 packages for the application. These sis files contain the
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem embedded sis that has the application repository as a Centrep patch. This sis
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem is self-signed and conditonally installs the exe file depending on the environment
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem These SIS files are used to test a standard installation
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem The following packages are used for the APP-SP test
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KSY package. This is the embedded PU sis that goes in AppY.sis
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KSY.pkg
+Processing KSY.pkg...
+Created KSY.sis.
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KSY.sis KSYs.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the APPY package. This package will install an APP exe
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem a keyspace in an embedded PU package and an SP package to be used for the uninstall
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis APPY.pkg
+Processing APPY.pkg...
+Created APPY.sis.
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S APPY.sis APPYs.sis certstore\appx.cer certstore\appx.key
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KSY1 package. This is the embedded PU sis that goes in AppY1.sis
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KSY1.pkg
+Processing KSY1.pkg...
+Created KSY1.sis.
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KSY1.sis KSY1s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the APPY1 package. This package will install the APP exe
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem a new version of the keyspace in an embedded PU package and an SP package
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem to be used for the uninstall
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis APPY1.pkg
+Processing APPY1.pkg...
+Created APPY1.sis.
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S APPY1.sis APPY1s.sis certstore\appx.cer certstore\appx.key
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the KSY2 package. This is the embedded PU sis that goes in AppY2.sis
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis KSY2.pkg
+Processing KSY2.pkg...
+Created KSY2.sis.
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S KSY2.sis KSY2s.sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem Make and sign the APPY2 package. This package will install the APP exe
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem a new version of the keyspace in an embedded PU package and an SP package
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] rem to be used for the uninstall
+
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] makesis APPY2.pkg
+Processing APPY2.pkg...
+Created APPY2.sis.
+Y:\persistentdata\persistentstorage\centralrepository\test\testexecute\SWI\data> [EPOC] signsis -S APPY2.sis APPY2s.sis certstore\appx.cer certstore\appx.key
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_dosis.bat Thu May 27 14:29:47 2010 +0300
@@ -0,0 +1,19 @@
+@echo off
+rem
+rem Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+rem All rights reserved.
+rem This component and the accompanying materials are made available
+rem under the terms of "Eclipse Public License v1.0"
+rem which accompanies this distribution, and is available
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+rem
+rem Initial Contributors:
+rem Nokia Corporation - initial contribution.
+rem
+rem Contributors:
+rem
+rem Description:
+rem
+@echo on
+
+dosis rnd_sis certstore\Nokia_RnDCert_02.der certstore\Nokia_RnDCert_02.key
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/appx.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/appxs.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/appy.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/appy1.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/appy1s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/appy2.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/appy2s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/appys.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/centrepswiteststub.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/kp12.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/kp12s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/kp14.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/kp14s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/kp2.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/kp22.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/kp22s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/kp23.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/kp23s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/kp2s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/kp3.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/kp3s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/kp4.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/kp41.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/kp41s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/kp4s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/kp62.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/kp62s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/kps14.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/kps14s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/kps4.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/kps4s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/kps64.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/kps64s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/ks12.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/ks12s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/ks14.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/ks14s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/ks2.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/ks22.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/ks22s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/ks2s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/ks3.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/ks3s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/ks4.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/ks41.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/ks41s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/ks4s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/ks51.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/ks51s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/ks62.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/ks62s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/ksd.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/ksds.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/ksx.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/ksxs.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/ksy.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/ksy1.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/ksy1s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/ksy2.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/ksy2s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/rnd_sis/ksys.sis has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/data/techview_dosis.bat Thu May 27 14:29:47 2010 +0300
@@ -0,0 +1,19 @@
+@echo off
+rem
+rem Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+rem All rights reserved.
+rem This component and the accompanying materials are made available
+rem under the terms of "Eclipse Public License v1.0"
+rem which accompanies this distribution, and is available
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+rem
+rem Initial Contributors:
+rem Nokia Corporation - initial contribution.
+rem
+rem Contributors:
+rem
+rem Description:
+rem
+@echo on
+
+dosis techview_sis certstore\centreproot.pem certstore\centreproot.key
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/appx.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/appxs.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/appy.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/appy1.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/appy1s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/appy2.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/appy2s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/appys.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/centrepswiteststub.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/kp12.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/kp12s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/kp14.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/kp14s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/kp2.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/kp22.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/kp22s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/kp23.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/kp23s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/kp2s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/kp3.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/kp3s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/kp4.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/kp41.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/kp41s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/kp4s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/kp62.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/kp62s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/kps14.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/kps14s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/kps4.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/kps4s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/kps64.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/kps64s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/ks12.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/ks12s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/ks14.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/ks14s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/ks2.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/ks22.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/ks22s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/ks2s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/ks3.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/ks3s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/ks4.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/ks41.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/ks41s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/ks4s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/ks51.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/ks51s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/ks62.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/ks62s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/ksd.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/ksds.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/ksx.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/ksxs.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/ksy.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/ksy1.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/ksy1s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/ksy2.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/ksy2s.sis has changed
Binary file persistentstorage/centralrepository/test/testexecute/SWI/data/techview_sis/ksys.sis has changed
--- a/persistentstorage/centralrepository/test/testexecute/SWI/group/bld.inf Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/centralrepository/test/testexecute/SWI/group/bld.inf Thu May 27 14:29:47 2010 +0300
@@ -65,50 +65,89 @@
../data/certstore/swicertstore.dat z:/resource/swicertstore.dat
./swicertstoredat.iby /epoc32/rom/include/swicertstoredat.iby
+#ifdef __SERIES60_
+
// SP tests...
-../data/KS12s.sis z:/tef_centralrepository/ks12s.sis
-../data/KS14s.sis z:/tef_centralrepository/ks14s.sis
-../data/KS2s.sis z:/tef_centralrepository/ks2s.sis
-../data/KS22s.sis z:/tef_centralrepository/ks22s.sis
-../data/KS3s.sis z:/tef_centralrepository/ks3s.sis
-../data/KS4s.sis z:/tef_centralrepository/ks4s.sis
-../data/KS41s.sis z:/tef_centralrepository/ks41s.sis
-../data/KS51s.sis z:/tef_centralrepository/ks51s.sis
-../data/KS62s.sis z:/tef_centralrepository/ks62s.sis
+../data/rnd_sis/KS12s.sis z:/tef_centralrepository/ks12s.sis
+../data/rnd_sis/KS14s.sis z:/tef_centralrepository/ks14s.sis
+../data/rnd_sis/KS2s.sis z:/tef_centralrepository/ks2s.sis
+../data/rnd_sis/KS22s.sis z:/tef_centralrepository/ks22s.sis
+../data/rnd_sis/KS3s.sis z:/tef_centralrepository/ks3s.sis
+../data/rnd_sis/KS4s.sis z:/tef_centralrepository/ks4s.sis
+../data/rnd_sis/KS41s.sis z:/tef_centralrepository/ks41s.sis
+../data/rnd_sis/KS51s.sis z:/tef_centralrepository/ks51s.sis
+../data/rnd_sis/KS62s.sis z:/tef_centralrepository/ks62s.sis
// PU tests...
-../data/KP12s.sis z:/tef_centralrepository/kp12s.sis
-../data/KP14s.sis z:/tef_centralrepository/kp14s.sis
-../data/KPS14s.sis z:/tef_centralrepository/kps14s.sis
-../data/KP2s.sis z:/tef_centralrepository/kp2s.sis
-../data/KP22s.sis z:/tef_centralrepository/kp22s.sis
-../data/KP23s.sis z:/tef_centralrepository/kp23s.sis
-../data/KP3s.sis z:/tef_centralrepository/kp3s.sis
-../data/KP4s.sis z:/tef_centralrepository/kp4s.sis
-../data/KP41s.sis z:/tef_centralrepository/kp41s.sis
-../data/KPS4s.sis z:/tef_centralrepository/kps4s.sis
-../data/KP62s.sis z:/tef_centralrepository/kp62s.sis
-../data/KPS64s.sis z:/tef_centralrepository/kps64s.sis
+../data/rnd_sis/KP12s.sis z:/tef_centralrepository/kp12s.sis
+../data/rnd_sis/KP14s.sis z:/tef_centralrepository/kp14s.sis
+../data/rnd_sis/KPS14s.sis z:/tef_centralrepository/kps14s.sis
+../data/rnd_sis/KP2s.sis z:/tef_centralrepository/kp2s.sis
+../data/rnd_sis/KP22s.sis z:/tef_centralrepository/kp22s.sis
+../data/rnd_sis/KP23s.sis z:/tef_centralrepository/kp23s.sis
+../data/rnd_sis/KP3s.sis z:/tef_centralrepository/kp3s.sis
+../data/rnd_sis/KP4s.sis z:/tef_centralrepository/kp4s.sis
+../data/rnd_sis/KP41s.sis z:/tef_centralrepository/kp41s.sis
+../data/rnd_sis/KPS4s.sis z:/tef_centralrepository/kps4s.sis
+../data/rnd_sis/KP62s.sis z:/tef_centralrepository/kp62s.sis
+../data/rnd_sis/KPS64s.sis z:/tef_centralrepository/kps64s.sis
// SWI-BUR tests...
-../data/APPXs.sis z:/tef_centralrepository/appxs.sis
+../data/rnd_sis/APPXs.sis z:/tef_centralrepository/appxs.sis
// SWI-APP tests
-../data/APPYs.sis z:/tef_centralrepository/appys.sis
-
-../data/KSYs.sis z:/tef_centralrepository/ksys.sis
-
-../data/APPY1s.sis z:/tef_centralrepository/appy1s.sis
-
-../data/KSY1s.sis z:/tef_centralrepository/ksy1s.sis
-
-../data/APPY2s.sis z:/tef_centralrepository/appy2s.sis
-
-../data/KSY2s.sis z:/tef_centralrepository/ksy2s.sis
-
+../data/rnd_sis/APPYs.sis z:/tef_centralrepository/appys.sis
+../data/rnd_sis/KSYs.sis z:/tef_centralrepository/ksys.sis
+../data/rnd_sis/APPY1s.sis z:/tef_centralrepository/appy1s.sis
+../data/rnd_sis/KSY1s.sis z:/tef_centralrepository/ksy1s.sis
+../data/rnd_sis/APPY2s.sis z:/tef_centralrepository/appy2s.sis
+../data/rnd_sis/KSY2s.sis z:/tef_centralrepository/ksy2s.sis
// SWI defect tests...
-../data/KSDs.sis z:/tef_centralrepository/ksds.sis
+../data/rnd_sis/KSDs.sis z:/tef_centralrepository/ksds.sis
+
+#else
+
+// SP tests...
+../data/techview_sis/KS12s.sis z:/tef_centralrepository/ks12s.sis
+../data/techview_sis/KS14s.sis z:/tef_centralrepository/ks14s.sis
+../data/techview_sis/KS2s.sis z:/tef_centralrepository/ks2s.sis
+../data/techview_sis/KS22s.sis z:/tef_centralrepository/ks22s.sis
+../data/techview_sis/KS3s.sis z:/tef_centralrepository/ks3s.sis
+../data/techview_sis/KS4s.sis z:/tef_centralrepository/ks4s.sis
+../data/techview_sis/KS41s.sis z:/tef_centralrepository/ks41s.sis
+../data/techview_sis/KS51s.sis z:/tef_centralrepository/ks51s.sis
+../data/techview_sis/KS62s.sis z:/tef_centralrepository/ks62s.sis
+
+// PU tests...
+../data/techview_sis/KP12s.sis z:/tef_centralrepository/kp12s.sis
+../data/techview_sis/KP14s.sis z:/tef_centralrepository/kp14s.sis
+../data/techview_sis/KPS14s.sis z:/tef_centralrepository/kps14s.sis
+../data/techview_sis/KP2s.sis z:/tef_centralrepository/kp2s.sis
+../data/techview_sis/KP22s.sis z:/tef_centralrepository/kp22s.sis
+../data/techview_sis/KP23s.sis z:/tef_centralrepository/kp23s.sis
+../data/techview_sis/KP3s.sis z:/tef_centralrepository/kp3s.sis
+../data/techview_sis/KP4s.sis z:/tef_centralrepository/kp4s.sis
+../data/techview_sis/KP41s.sis z:/tef_centralrepository/kp41s.sis
+../data/techview_sis/KPS4s.sis z:/tef_centralrepository/kps4s.sis
+../data/techview_sis/KP62s.sis z:/tef_centralrepository/kp62s.sis
+../data/techview_sis/KPS64s.sis z:/tef_centralrepository/kps64s.sis
+
+// SWI-BUR tests...
+../data/techview_sis/APPXs.sis z:/tef_centralrepository/appxs.sis
+
+// SWI-APP tests
+../data/techview_sis/APPYs.sis z:/tef_centralrepository/appys.sis
+../data/techview_sis/KSYs.sis z:/tef_centralrepository/ksys.sis
+../data/techview_sis/APPY1s.sis z:/tef_centralrepository/appy1s.sis
+../data/techview_sis/KSY1s.sis z:/tef_centralrepository/ksy1s.sis
+../data/techview_sis/APPY2s.sis z:/tef_centralrepository/appy2s.sis
+../data/techview_sis/KSY2s.sis z:/tef_centralrepository/ksy2s.sis
+
+// SWI defect tests...
+../data/techview_sis/KSDs.sis z:/tef_centralrepository/ksds.sis
+
+#endif //__SERIES60_
PRJ_TESTMMPFILES
// TestExecute test binaries
--- a/persistentstorage/sql/GROUP/BLD.INF Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/GROUP/BLD.INF Thu May 27 14:29:47 2010 +0300
@@ -76,6 +76,7 @@
t_sqlsecurity3.mmp
t_sqlsecurity4.mmp
t_sqlsecurity5.mmp
+t_sqlsecurity6.mmp
t_sqlattach.mmp
#ifndef WINS //hardware only
t_sqlattach2.mmp manual
@@ -109,6 +110,7 @@
t_sqlfilesrvcrash1.mmp manual
t_sqlfilesrvcrash2.mmp manual
#endif
+t_sqlcorrupt.mmp
t_sqlenvdestroy.mmp
--- a/persistentstorage/sql/GROUP/SqlDb.mmp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/GROUP/SqlDb.mmp Thu May 27 14:29:47 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -31,6 +31,9 @@
UID 0x1000008d 0x10281E18
+//CodeWarrior compilation options - disable the "illegal pragma" warning
+OPTION CW -w noillpragmas
+
OS_LAYER_SYSTEMINCLUDE_SYMBIAN
USERINCLUDE ../INC
USERINCLUDE ../SRC/Client
--- a/persistentstorage/sql/GROUP/sqltests.bat Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/GROUP/sqltests.bat Thu May 27 14:29:47 2010 +0300
@@ -36,6 +36,7 @@
T_SQLSECURITY3.EXE
T_SQLSECURITY4.EXE
T_SQLSECURITY5.EXE
+T_SQLSECURITY6.EXE
T_SQLATTACH.EXE
T_SQLPERFORMANCE.EXE
T_SQLPERFORMANCE2.EXE
@@ -61,4 +62,5 @@
T_SQLFILEBUF64.EXE
T_SQLAUTHORIZER.EXE
T_SQLSTARTUP.EXE
+T_SQLCORRUPT.EXE
T_SQLENVDESTROY.EXE
--- a/persistentstorage/sql/GROUP/sqltests.iby Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/GROUP/sqltests.iby Thu May 27 14:29:47 2010 +0300
@@ -80,6 +80,7 @@
file=ABI_DIR\BUILD_DIR\T_SQLSECURITY3.EXE \TEST\T_SQLSECURITY3.EXE
file=ABI_DIR\BUILD_DIR\T_SQLSECURITY4.EXE \TEST\T_SQLSECURITY4.EXE
file=ABI_DIR\BUILD_DIR\T_SQLSECURITY5.EXE \TEST\T_SQLSECURITY5.EXE
+file=ABI_DIR\BUILD_DIR\T_SQLSECURITY6.EXE \TEST\T_SQLSECURITY6.EXE
file=ABI_DIR\BUILD_DIR\T_SQLATTACH.EXE \TEST\T_SQLATTACH.EXE
file=ABI_DIR\BUILD_DIR\T_SQLATTACH2.EXE \TEST\T_SQLATTACH2.EXE
file=ABI_DIR\BUILD_DIR\T_SQLPERFORMANCE.EXE \TEST\T_SQLPERFORMANCE.EXE
@@ -109,6 +110,7 @@
file=ABI_DIR\BUILD_DIR\T_SQLDB64.EXE \TEST\T_SQLDB64.EXE
file=ABI_DIR\BUILD_DIR\T_SQLFILESRVCRASH1.EXE \TEST\T_SQLFILESRVCRASH1.EXE
file=ABI_DIR\BUILD_DIR\T_SQLFILESRVCRASH2.EXE \TEST\T_SQLFILESRVCRASH2.EXE
+file=ABI_DIR\BUILD_DIR\T_SQLCORRUPT.EXE \TEST\T_SQLCORRUPT.EXE
file=ABI_DIR\BUILD_DIR\T_SQLENVDESTROY.EXE \TEST\T_SQLENVDESTROY.EXE
#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/sql/GROUP/t_sqlcorrupt.mmp Thu May 27 14:29:47 2010 +0300
@@ -0,0 +1,36 @@
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+#include <e32utrace.mmh>
+
+TARGET t_sqlcorrupt.exe
+TARGETTYPE EXE
+CAPABILITY ProtServ AllFiles
+
+USERINCLUDE .
+OS_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+SOURCEPATH ../TEST
+SOURCE t_sqlcorrupt.cpp
+
+LIBRARY euser.lib
+LIBRARY efsrv.lib
+LIBRARY sqldb.lib
+LIBRARY bafl.lib
+LIBRARY estor.lib
+
+UID 0 0x08770000
+VENDORID 0x70000001
+
+SMPSAFE
\ No newline at end of file
--- a/persistentstorage/sql/GROUP/t_sqlperformance.mmp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/GROUP/t_sqlperformance.mmp Thu May 27 14:29:47 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -40,7 +40,7 @@
#endif
SOURCEPATH ../TEST
-SOURCE t_sqlperformance.cpp
+SOURCE t_sqlperformance.cpp t_sqlcmdlineutil.cpp
SOURCEPATH ../SRC/Common
SOURCE SqlUtil.cpp
--- a/persistentstorage/sql/GROUP/t_sqlperformance2.mmp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/GROUP/t_sqlperformance2.mmp Thu May 27 14:29:47 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -22,7 +22,7 @@
EPOCHEAPSIZE 0x00200000 0x02000000 //2Mb initial heap size
SOURCEPATH ../TEST
-SOURCE t_sqlperformance2.cpp
+SOURCE t_sqlperformance2.cpp t_sqlcmdlineutil.cpp
LIBRARY euser.lib
LIBRARY efsrv.lib
--- a/persistentstorage/sql/GROUP/t_sqlperformance3.mmp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/GROUP/t_sqlperformance3.mmp Thu May 27 14:29:47 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -21,7 +21,7 @@
OS_LAYER_SYSTEMINCLUDE_SYMBIAN
SOURCEPATH ../TEST
-SOURCE t_sqlperformance3.cpp
+SOURCE t_sqlperformance3.cpp t_sqlcmdlineutil.cpp
LIBRARY euser.lib
LIBRARY efsrv.lib
--- a/persistentstorage/sql/GROUP/t_sqlperformance4.mmp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/GROUP/t_sqlperformance4.mmp Thu May 27 14:29:47 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -23,7 +23,7 @@
EPOCHEAPSIZE 0x00200000 0x02000000 //2Mb initial heap size
SOURCEPATH ../TEST
-SOURCE t_sqlperformance4.cpp
+SOURCE t_sqlperformance4.cpp t_sqlcmdlineutil.cpp
LIBRARY euser.lib
LIBRARY efsrv.lib
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/sql/GROUP/t_sqlsecurity6.mmp Thu May 27 14:29:47 2010 +0300
@@ -0,0 +1,36 @@
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+#include <e32utrace.mmh>
+
+TARGET t_sqlsecurity6.exe
+TARGETTYPE EXE
+CAPABILITY WriteUserData ReadUserData
+
+USERINCLUDE .
+OS_LAYER_SYSTEMINCLUDE_SYMBIAN
+
+SOURCEPATH ../TEST
+SOURCE t_sqlsecurity6.cpp
+
+LIBRARY euser.lib
+LIBRARY efsrv.lib
+LIBRARY sqldb.lib
+LIBRARY bafl.lib
+LIBRARY estor.lib
+
+UID 0 0x00009876
+VENDORID 0x70000001
+
+SMPSAFE
\ No newline at end of file
--- a/persistentstorage/sql/OsLayer/FileBuf64.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/OsLayer/FileBuf64.cpp Thu May 27 14:29:47 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -22,53 +22,98 @@
extern TBool TheOsCallTimeDetailedProfileEnabled;//If true, the OS porting layer call details are enabled and for each call an entry will be added to the log file (epocwind.out).
-#define PROFILE_READ(pos,amount) \
+#define PROFILE_READ(pos, amount, err) \
do \
{ \
if(TheOsCallTimeDetailedProfileEnabled) \
{ \
++iFileReadCount; iFileReadAmount += (amount); \
- RDebug::Print(_L(" -- FRead this=%X, Cnt=%d, Pos=%ld, Amt=%d, Ttl=%ld\r\n"), (TUint32)this, iFileReadCount, pos, amount, iFileReadAmount); \
+ RDebug::Print(_L("[SQL-FBUF]¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬\"%X\"¬Read¬%d¬%ld¬%d¬%ld¬%d\r\n"), (TUint32)this, iFileReadCount, pos, amount, iFileReadAmount, err); \
} \
} while(0)
-#define PROFILE_WRITE(pos,amount) \
+#define PROFILE_WRITE(pos, amount, err) \
do \
{ \
if(TheOsCallTimeDetailedProfileEnabled) \
{ \
++iFileWriteCount; iFileWriteAmount += (amount); \
- RDebug::Print(_L(" -- FWrite this=%X, Cnt=%d, Pos=%ld, Amt=%d, Ttl=%ld\r\n"), (TUint32)this, iFileWriteCount, pos, amount, iFileWriteAmount); \
+ RDebug::Print(_L("[SQL-FBUF]¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬\"%X\"¬Write¬%d¬%ld¬%d¬%ld¬%d\r\n"), (TUint32)this, iFileWriteCount, pos, amount, iFileWriteAmount, err); \
} \
} while(0)
-#define PROFILE_SIZE() \
+#define PROFILE_SIZE(size, err) \
do \
{ \
if(TheOsCallTimeDetailedProfileEnabled) \
{ \
++iFileSizeCount; \
- RDebug::Print(_L(" -- FSize this=%X, Cnt=%d\r\n"), (TUint32)this, iFileSizeCount); \
+ RDebug::Print(_L("[SQL-FBUF]¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬\"%X\"¬Size¬%d¬%ld¬¬¬%d\r\n"), (TUint32)this, iFileSizeCount, size, err); \
} \
} while(0)
-#define PROFILE_SETSIZE() \
+#define PROFILE_SETSIZE(size, err) \
do \
{ \
if(TheOsCallTimeDetailedProfileEnabled) \
{ \
++iFileSetSizeCount; \
- RDebug::Print(_L(" -- FSetSize this=%X, Cnt=%d\r\n"), (TUint32)this, iFileSetSizeCount); \
+ RDebug::Print(_L("[SQL-FBUF]¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬\"%X\"¬SetSize¬%d¬%ld¬¬¬%d\r\n"), (TUint32)this, iFileSetSizeCount, size, err); \
} \
} while(0)
-#define PROFILE_FLUSH() \
+#define PROFILE_FLUSH(err) \
do \
{ \
if(TheOsCallTimeDetailedProfileEnabled) \
{ \
++iFileFlushCount; \
- RDebug::Print(_L(" -- FFlush this=%X, Cnt=%d\r\n"), (TUint32)this, iFileFlushCount); \
+ RDebug::Print(_L("[SQL-FBUF]¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬\"%X\"¬Flush¬%d¬¬¬¬%d\r\n"), (TUint32)this, iFileFlushCount, err); \
+ } \
+ } while(0)
+
+#define PROFILE_CREATE(fname, err) \
+ do \
+ { \
+ if(TheOsCallTimeDetailedProfileEnabled) \
+ { \
+ RDebug::Print(_L("[SQL-FBUF]¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬\"%X\"¬Create¬¬¬¬¬%d¬%S\r\n"), (TUint32)this, err, &fname); \
+ } \
+ } while(0)
+
+#define PROFILE_OPEN(fname, err) \
+ do \
+ { \
+ if(TheOsCallTimeDetailedProfileEnabled) \
+ { \
+ RDebug::Print(_L("[SQL-FBUF]¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬\"%X\"¬Open¬¬¬¬¬%d¬%S\r\n"), (TUint32)this, err, &fname); \
+ } \
+ } while(0)
+
+#define PROFILE_TEMP(fname, err) \
+ do \
+ { \
+ if(TheOsCallTimeDetailedProfileEnabled) \
+ { \
+ RDebug::Print(_L("[SQL-FBUF]¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬\"%X\"¬Temp¬¬¬¬¬%d¬%S\r\n"), (TUint32)this, err, &fname); \
+ } \
+ } while(0)
+
+#define PROFILE_ADOPT(fname, err) \
+ do \
+ { \
+ if(TheOsCallTimeDetailedProfileEnabled) \
+ { \
+ RDebug::Print(_L("[SQL-FBUF]¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬\"%X\"¬Adopt¬¬¬¬¬%d¬%S\r\n"), (TUint32)this, err, &fname); \
+ } \
+ } while(0)
+
+#define PROFILE_CLOSE() \
+ do \
+ { \
+ if(TheOsCallTimeDetailedProfileEnabled) \
+ { \
+ RDebug::Print(_L("[SQL-FBUF]¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬\"%X\"¬Close¬¬¬¬¬¬\r\n"), (TUint32)this); \
} \
} while(0)
@@ -80,12 +125,18 @@
#else
-#define PROFILE_READ(pos,amount) void(0)
-#define PROFILE_WRITE(pos,amount) void(0)
+#define PROFILE_READ(pos,amount, err) void(0)
+#define PROFILE_WRITE(pos,amount, err) void(0)
-#define PROFILE_SIZE() void(0)
-#define PROFILE_SETSIZE() void(0)
-#define PROFILE_FLUSH() void(0)
+#define PROFILE_SIZE(size, err) void(0)
+#define PROFILE_SETSIZE(size, err) void(0)
+#define PROFILE_FLUSH(err) void(0)
+
+#define PROFILE_CREATE(fname, err) void(0)
+#define PROFILE_OPEN(fname, err) void(0)
+#define PROFILE_TEMP(fname, err) void(0)
+#define PROFILE_ADOPT(fname, err) void(0)
+#define PROFILE_CLOSE() void(0)
#endif//_SQLPROFILER
@@ -238,6 +289,7 @@
{
err = iFile.Create(aFs, aFileName, aFileMode);
}
+ PROFILE_CREATE(aFileName, err);
return DoPostInit(err);
}
@@ -269,6 +321,7 @@
{
err = iFile.Open(aFs, aFileName, aFileMode);
}
+ PROFILE_OPEN(aFileName, err);
return DoPostInit(err);
}
@@ -300,6 +353,7 @@
{
err = iFile.Temp(aFs, aPath, aFileName, aFileMode);
}
+ PROFILE_TEMP(aFileName, err);
return DoPostInit(err);
}
@@ -336,6 +390,7 @@
{
err = iFile.AdoptFromClient(aMsg, aFsIndex, aFileIndex);
}
+ PROFILE_ADOPT(KNullDesC, err);
return DoPostInit(err);
}
@@ -356,6 +411,7 @@
iFile.Close();
User::Free(iBase);
iBase = 0;
+ PROFILE_CLOSE();
}
/**
@@ -441,7 +497,7 @@
if(err == KErrNone)
{
err = iFile.Read(aFilePos, aDes);
- PROFILE_READ(aFilePos, aDes.Size());
+ PROFILE_READ(aFilePos, aDes.Size(), err);
}
__FILEBUF64_INVARIANT();
return err;
@@ -472,7 +528,7 @@
iNextReadFilePosHits = 0;
TPtr8 ptr2(outptr, len);
err = iFile.Read(aFilePos, ptr2);
- PROFILE_READ(aFilePos, ptr2.Size());
+ PROFILE_READ(aFilePos, ptr2.Size(), err);
if(err == KErrNone)
{
iNextReadFilePos = aFilePos + len;
@@ -496,7 +552,7 @@
}
TPtr8 ptr(iBase, Min(iCapacity, (len + readahead)));
err = iFile.Read(aFilePos, ptr);
- PROFILE_READ(aFilePos, ptr.Size());
+ PROFILE_READ(aFilePos, ptr.Size(), err);
if(err == KErrNone)
{
iFilePos = aFilePos;
@@ -787,8 +843,8 @@
__FILEBUF64_INVARIANT();
return KErrNone;
}
- PROFILE_SIZE();
TInt err = iFile.Size(iFileSize);
+ PROFILE_SIZE(iFileSize, err);
if(err != KErrNone)
{
DoDiscard();
@@ -825,8 +881,8 @@
{
iLength = aFileSize - iFilePos;
}
- PROFILE_SETSIZE();
TInt err = iFile.SetSize(aFileSize);
+ PROFILE_SETSIZE(aFileSize, err);
if(err != KErrNone)
{
DoDiscard();
@@ -857,8 +913,8 @@
__FILEBUF64_INVARIANT();
return err;
}
- PROFILE_FLUSH();
err = iFile.Flush();
+ PROFILE_FLUSH(err);
if(err != KErrNone)
{
DoDiscard();
@@ -889,9 +945,9 @@
__FILEBUF64_INVARIANT();
return KErrNone;
}
- PROFILE_WRITE(iFilePos, iLength);
TPtrC8 data(iBase, iLength);
TInt err = iFile.Write(iFilePos, data);
+ PROFILE_WRITE(iFilePos, iLength, err);
if(err == KErrNone)
{
iFileSize = Max(iFileSize, (iFilePos + iLength));
--- a/persistentstorage/sql/OsLayer/os_symbian.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/OsLayer/os_symbian.cpp Thu May 27 14:29:47 2010 +0300
@@ -84,6 +84,10 @@
EPanicFastCounterFreq =21
};
+//Bit-mask constant. If xOpen()'s "aFlag" parameter contains one of these bits set, then the the file top be
+//opened or created is a journal file.
+const TUint KJournalFileTypeBitMask = SQLITE_OPEN_MAIN_JOURNAL | SQLITE_OPEN_TEMP_JOURNAL | SQLITE_OPEN_SUBJOURNAL | SQLITE_OPEN_MASTER_JOURNAL;
+
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -356,7 +360,7 @@
{
TOsCallProfile('M', "CL"), TOsCallProfile('M', "RD"), TOsCallProfile('M', "WR"), TOsCallProfile('M', "TR"),
TOsCallProfile('M', "SY"), TOsCallProfile('M', "FS"), TOsCallProfile('M', "LK"), TOsCallProfile('M', "UL"),
- TOsCallProfile('M', "CL"), TOsCallProfile('M', "FC"), TOsCallProfile('M', "SS"), TOsCallProfile('M', "DC"),
+ TOsCallProfile('M', "RL"), TOsCallProfile('M', "FC"), TOsCallProfile('M', "SS"), TOsCallProfile('M', "DC"),
TOsCallProfile('M', "OP"), TOsCallProfile('M', "DE"), TOsCallProfile('M', "AC"), TOsCallProfile('M', "FN"),
TOsCallProfile('M', "RN"), TOsCallProfile('M', "SL"), TOsCallProfile('M', "CT"), TOsCallProfile('M', "LE")
};
@@ -367,7 +371,7 @@
{
TOsCallProfile('J', "CL"), TOsCallProfile('J', "RD"), TOsCallProfile('J', "WR"), TOsCallProfile('J', "TR"),
TOsCallProfile('J', "SY"), TOsCallProfile('J', "FS"), TOsCallProfile('J', "LK"), TOsCallProfile('J', "UL"),
- TOsCallProfile('J', "CL"), TOsCallProfile('J', "FC"), TOsCallProfile('J', "SS"), TOsCallProfile('J', "DC"),
+ TOsCallProfile('J', "RL"), TOsCallProfile('J', "FC"), TOsCallProfile('J', "SS"), TOsCallProfile('J', "DC"),
TOsCallProfile('J', "OP"), TOsCallProfile('J', "DE"), TOsCallProfile('J', "AC"), TOsCallProfile('J', "FN"),
TOsCallProfile('J', "RN"), TOsCallProfile('J', "SL"), TOsCallProfile('J', "CT"), TOsCallProfile('J', "LE")
};
@@ -380,11 +384,15 @@
//aProfileRef - a reference to the related TOsCallProfile object - TheOsCallMProfile[] or TheOsCallJProfile[] entry;
//aOffset - file offset in bytes;
//aBytes - amount of bytes to be read/written;
- TOsCallCounter(TInt64& aOsCallTicksEntryRef, TOsCallProfile& aOsCallProfileRef, TInt64 aOffset, TInt aBytes) :
+ //aOptional - might be NULL. Used to print out the name of the file being processed.
+ TOsCallCounter(TInt64& aOsCallTicksEntryRef, TOsCallProfile& aOsCallProfileRef, TInt64 aOffset, TInt aBytes,
+ const sqlite3_file* aHandle, const char* aOptional) :
iOsCallTicksEntryRef(aOsCallTicksEntryRef),
iOsCallProfileRef(aOsCallProfileRef),
iOffset(aOffset),
- iBytes(aBytes)
+ iBytes(aBytes),
+ iHandle((TUint)aHandle),
+ iOptional((const TUint8*)aOptional)
{
if(TheOsCallTimeProfileEnabled)
{
@@ -407,18 +415,32 @@
++iOsCallProfileRef.iCallCounter;
iOsCallProfileRef.iTicksTotal += diffTicks;
iOsCallProfileRef.iBytesTotal += iBytes;
- // 1 2 3 4 5 6 7 8 9 10
- RDebug::Print(_L("'%c','%c%c',%d,%d,%ld,%d,%ld,%ld,%ld\n"),
- iOsCallProfileRef.iType, //1
- iOsCallProfileRef.iIdentifier[0], //2
- iOsCallProfileRef.iIdentifier[1], //3
- TheOpCounter, //4
- iOsCallProfileRef.iCallCounter, //5
- iOffset, //6
- iBytes, //7
- diffTicks, //8
- iOsCallProfileRef.iBytesTotal, //9
- iOsCallProfileRef.iTicksTotal); //10
+ TFileName fname;
+ if(iOptional)
+ {
+ TPtrC8 fn8(iOptional);
+ fname.Copy(fn8);
+ }
+ // 0 1 2 3 4 5 6 7 8 9 10 11
+ RDebug::Print(_L("[SQL-OS]¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬\"%X\"¬%c¬%c%c¬%d¬%d¬%ld¬%d¬%ld¬%ld¬%ld¬%S\n"),
+ //[SQL-OS]
+ //Handle
+ //Time from start, microseconds
+ //Subtype
+ //IPC sequence counter
+ //IPC call name
+ iHandle, //sqlite3_file*
+ iOsCallProfileRef.iType, //1 - main or journal file
+ iOsCallProfileRef.iIdentifier[0], //2 - 1st letter - operation type
+ iOsCallProfileRef.iIdentifier[1], //3 - 2nd letter - operation type
+ TheOpCounter, //4 - Operation counter
+ iOsCallProfileRef.iCallCounter, //5 - This call type counter
+ iOffset, //6 - File offset
+ iBytes, //7 - Data, bytes
+ diffTicks, //8 - Ticks
+ iOsCallProfileRef.iBytesTotal, //9 - Data total, bytes
+ iOsCallProfileRef.iTicksTotal, //10- Ticks total
+ &fname); //11- File name
}
}
}
@@ -428,6 +450,8 @@
TInt64 iOffset;
TInt iBytes;
TUint32 iStartTicks;
+ TUint iHandle;
+ const TUint8* iOptional;
};
inline TOsCallProfile& OsCallProfile(TBool aType, TInt aIndex)
@@ -435,7 +459,7 @@
return aType ? TheOsCallJProfile[aIndex] : TheOsCallMProfile[aIndex];
}
-# define __OSTIME_COUNTER(aOsCallTicksRef, aOsCallProfileRef, aOffset, aBytes) TOsCallCounter osCallCounter(aOsCallTicksRef, aOsCallProfileRef, aOffset, aBytes)
+# define __OSTIME_COUNTER(aOsCallTicksRef, aOsCallProfileRef, aOffset, aBytes, aHandle, aOpt) TOsCallCounter osCallCounter(aOsCallTicksRef, aOsCallProfileRef, aOffset, aBytes, aHandle, aOpt)
#else //_SQLPROFILER
@@ -447,7 +471,7 @@
# define __OS_CALL(aOpType, a1, a2) void(0)
-# define __OSTIME_COUNTER(aOsCallTicksRef, aOsCallProfileRef, aOffset, aBytes) void(0)
+# define __OSTIME_COUNTER(aOsCallTicksRef, aOsCallProfileRef, aOffset, aBytes, aHandle, aOpt) void(0)
#endif//_SQLPROFILER
@@ -1218,8 +1242,9 @@
{
wchar_t* dest = reinterpret_cast <wchar_t*> (const_cast <TUint16*> (aFileNameDestBuf.Ptr()));
TInt len = mbstowcs(dest, aFileName, aFileNameDestBuf.MaxLength());
+ __ASSERT_DEBUG(len >= 0, User::Panic(KPanicCategory, EPanicInternalError));
//If len == aFileNameDestBuf.MaxLength(), then the output buffer is too small.
- if(len > 0 && len < aFileNameDestBuf.MaxLength())
+ if(len < aFileNameDestBuf.MaxLength())
{
aFileNameDestBuf.SetLength(len);
return ETrue;
@@ -1246,8 +1271,9 @@
char* dest = reinterpret_cast <char*> (const_cast <TUint8*> (aFileNameDestBuf.Ptr()));
const wchar_t* src = reinterpret_cast <const wchar_t*> (aFileName.Ptr());
TInt len = wcstombs(dest, src, aFileNameDestBuf.MaxLength());
+ __ASSERT_DEBUG(len >= 0, User::Panic(KPanicCategory, EPanicInternalError));
//If len == aFileNameDestBuf.MaxLength(), then the output buffer is too small.
- if(len > 0 && len < aFileNameDestBuf.MaxLength())
+ if(len < aFileNameDestBuf.MaxLength())
{
aFileNameDestBuf.SetLength(len);
return ETrue;
@@ -1477,7 +1503,7 @@
SQLUTRACE_PROFILER(aDbFile);
TDbFile& dbFile = ::DbFile(aDbFile);
__OS_CALL(EOsFileClose, 0, 0);
- __OSTIME_COUNTER(TheOsCallTicks[EOsFileClose], ::OsCallProfile(dbFile.iIsJournal, EOsFileClose), 0, 0);
+ __OSTIME_COUNTER(TheOsCallTicks[EOsFileClose], ::OsCallProfile(dbFile.iIsJournal, EOsFileClose), 0, 0, aDbFile, 0);
__FS_CALL(EFsOpFileClose, 0);
dbFile.iFileBuf.Close();
if(dbFile.iFullName)
@@ -1519,7 +1545,7 @@
TDbFile& dbFile = ::DbFile(aDbFile);
__OS_CALL(EOsFileRead, 0, 0);
__COUNTER_INCR(TheSqlSrvProfilerFileRead);
- __OSTIME_COUNTER(TheOsCallTicks[EOsFileRead], ::OsCallProfile(dbFile.iIsJournal, EOsFileRead), aOffset, aAmt);
+ __OSTIME_COUNTER(TheOsCallTicks[EOsFileRead], ::OsCallProfile(dbFile.iIsJournal, EOsFileRead), aOffset, aAmt, aDbFile, 0);
TPtr8 ptr((TUint8*)aBuf, 0, aAmt);
TInt err = dbFile.iFileBuf.Read(aOffset, ptr);
TInt cnt = ptr.Length();
@@ -1582,7 +1608,7 @@
TDbFile& dbFile = ::DbFile(aDbFile);
__OS_CALL(EOsFileWrite, 0, 0);
__COUNTER_INCR(TheSqlSrvProfilerFileWrite);
- __OSTIME_COUNTER(TheOsCallTicks[EOsFileWrite], ::OsCallProfile(dbFile.iIsJournal, EOsFileWrite), aOffset, aAmt);
+ __OSTIME_COUNTER(TheOsCallTicks[EOsFileWrite], ::OsCallProfile(dbFile.iIsJournal, EOsFileWrite), aOffset, aAmt, aDbFile, 0);
TInt err = KErrAccessDenied;
if(!dbFile.iReadOnly)
{
@@ -1636,7 +1662,7 @@
TDbFile& dbFile = ::DbFile(aDbFile);
__OS_CALL(EOsFileTruncate, 0, 0);
__COUNTER_INCR(TheSqlSrvProfilerFileSetSize);
- __OSTIME_COUNTER(TheOsCallTicks[EOsFileTruncate], ::OsCallProfile(dbFile.iIsJournal, EOsFileTruncate), aLength, 0);
+ __OSTIME_COUNTER(TheOsCallTicks[EOsFileTruncate], ::OsCallProfile(dbFile.iIsJournal, EOsFileTruncate), aLength, 0, aDbFile, 0);
if(dbFile.iReadOnly)
{
COsLayerData::Instance().SetOsErrorCode(KErrAccessDenied);
@@ -1672,7 +1698,7 @@
TDbFile& dbFile = ::DbFile(aDbFile);
__OS_CALL(EOsFileSync, 0, 0);
__COUNTER_INCR(TheSqlSrvProfilerFileSync);
- __OSTIME_COUNTER(TheOsCallTicks[EOsFileSync], ::OsCallProfile(dbFile.iIsJournal, EOsFileSync), 0, 0);
+ __OSTIME_COUNTER(TheOsCallTicks[EOsFileSync], ::OsCallProfile(dbFile.iIsJournal, EOsFileSync), 0, 0, aDbFile, 0);
if(dbFile.iReadOnly)
{
COsLayerData::Instance().SetOsErrorCode(KErrAccessDenied);
@@ -1707,7 +1733,7 @@
SQLUTRACE_PROFILER(aDbFile);
TDbFile& dbFile = ::DbFile(aDbFile);
__OS_CALL(EOsFileFileSize, 0, 0);
- __OSTIME_COUNTER(TheOsCallTicks[EOsFileFileSize], ::OsCallProfile(dbFile.iIsJournal, EOsFileFileSize), 0, 0);
+ __OSTIME_COUNTER(TheOsCallTicks[EOsFileFileSize], ::OsCallProfile(dbFile.iIsJournal, EOsFileFileSize), 0, 0, aDbFile, 0);
__FS_CALL(EFsOpFileSize, 0);
TInt err = dbFile.iFileBuf.Size(*aSize);
COsLayerData::Instance().SetOsErrorCode(err);
@@ -1741,7 +1767,7 @@
SQLUTRACE_PROFILER(aDbFile);
TDbFile& dbFile = ::DbFile(aDbFile);
__OS_CALL(EOsFileLock, 0, 0);
- __OSTIME_COUNTER(TheOsCallTicks[EOsFileLock], ::OsCallProfile(dbFile.iIsJournal, EOsFileLock), aLockType, 0);
+ __OSTIME_COUNTER(TheOsCallTicks[EOsFileLock], ::OsCallProfile(dbFile.iIsJournal, EOsFileLock), aLockType, 0, aDbFile, 0);
//If there is already a lock of this type or more restrictive on the database file, do nothing.
if(dbFile.iLockType >= aLockType)
{
@@ -1774,7 +1800,7 @@
SQLUTRACE_PROFILER(aDbFile);
TDbFile& dbFile = ::DbFile(aDbFile);
__OS_CALL(EOsFileUnlock, 0, 0);
- __OSTIME_COUNTER(TheOsCallTicks[EOsFileUnlock], ::OsCallProfile(dbFile.iIsJournal, EOsFileUnlock), aLockType, 0);
+ __OSTIME_COUNTER(TheOsCallTicks[EOsFileUnlock], ::OsCallProfile(dbFile.iIsJournal, EOsFileUnlock), aLockType, 0, aDbFile, 0);
dbFile.iLockType = aLockType;
return SQLITE_OK;
}
@@ -1803,7 +1829,7 @@
SQLUTRACE_PROFILER(aDbFile);
TDbFile& dbFile = ::DbFile(aDbFile);
__OS_CALL(EOsFileCheckReservedLock, 0, 0);
- __OSTIME_COUNTER(TheOsCallTicks[EOsFileCheckReservedLock], ::OsCallProfile(dbFile.iIsJournal, EOsFileCheckReservedLock), 0, 0);
+ __OSTIME_COUNTER(TheOsCallTicks[EOsFileCheckReservedLock], ::OsCallProfile(dbFile.iIsJournal, EOsFileCheckReservedLock), 0, 0, aDbFile, 0);
*aResOut = dbFile.iLockType >= SQLITE_LOCK_RESERVED ? 1 : 0;
return SQLITE_OK;
}
@@ -1839,7 +1865,7 @@
SYMBIAN_TRACE_SQL_EVENTS_ONLY(UTF::Printf(UTF::TTraceContext(UTF::EInternals), KFileFileCtr, aOp));
TDbFile& dbFile = ::DbFile(aDbFile);
__OS_CALL(EOsFileFileControl, 0, 0);
- __OSTIME_COUNTER(TheOsCallTicks[EOsFileFileControl], ::OsCallProfile(dbFile.iIsJournal, EOsFileFileControl), aOp, 0);
+ __OSTIME_COUNTER(TheOsCallTicks[EOsFileFileControl], ::OsCallProfile(dbFile.iIsJournal, EOsFileFileControl), aOp, 0, aDbFile, 0);
TInt err = KErrNone;
switch(aOp)
{
@@ -1890,7 +1916,7 @@
SQLUTRACE_PROFILER(aDbFile);
TDbFile& dbFile = ::DbFile(aDbFile);
__OS_CALL(EOsFileSectorSize, 0, 0);
- __OSTIME_COUNTER(TheOsCallTicks[EOsFileSectorSize], ::OsCallProfile(dbFile.iIsJournal, EOsFileSectorSize), 0, 0);
+ __OSTIME_COUNTER(TheOsCallTicks[EOsFileSectorSize], ::OsCallProfile(dbFile.iIsJournal, EOsFileSectorSize), 0, 0, aDbFile, 0);
__ASSERT_DEBUG(dbFile.iSectorSize > 0, User::Panic(KPanicCategory, EPanicInternalError));
if(dbFile.iSectorSize > 0)
{
@@ -1921,7 +1947,7 @@
SQLUTRACE_PROFILER(aDbFile);
TDbFile& dbFile = ::DbFile(aDbFile);
__OS_CALL(EOsFileDeviceCharacteristics, 0, 0);
- __OSTIME_COUNTER(TheOsCallTicks[EOsFileDeviceCharacteristics], ::OsCallProfile(dbFile.iIsJournal, EOsFileDeviceCharacteristics), 0, 0);
+ __OSTIME_COUNTER(TheOsCallTicks[EOsFileDeviceCharacteristics], ::OsCallProfile(dbFile.iIsJournal, EOsFileDeviceCharacteristics), 0, 0, aDbFile, 0);
__ASSERT_DEBUG(dbFile.iDeviceCharacteristics >= 0, User::Panic(KPanicCategory, EPanicInternalError));
if(dbFile.iDeviceCharacteristics >= 0)
{
@@ -2005,38 +2031,35 @@
{
deviceCharacteristics |= SQLITE_IOCAP_ATOMIC;
}
- if(aVolumeInfo.iBlockSize >= SQLITE_DEFAULT_SECTOR_SIZE && (aVolumeInfo.iBlockSize & (aVolumeInfo.iBlockSize - 1)) == 0)
+ switch(aVolumeInfo.iBlockSize)
{
- switch(aVolumeInfo.iBlockSize)
- {
- case 512:
- deviceCharacteristics |= SQLITE_IOCAP_ATOMIC512;
- break;
- case 1024:
- deviceCharacteristics |= SQLITE_IOCAP_ATOMIC1K;
- break;
- case 2048:
- deviceCharacteristics |= SQLITE_IOCAP_ATOMIC2K;
- break;
- case 4096:
- deviceCharacteristics |= SQLITE_IOCAP_ATOMIC4K;
- break;
- case 8192:
- deviceCharacteristics |= SQLITE_IOCAP_ATOMIC8K;
- break;
- case 16384:
- deviceCharacteristics |= SQLITE_IOCAP_ATOMIC16K;
- break;
- case 32768:
- deviceCharacteristics |= SQLITE_IOCAP_ATOMIC32K;
- break;
- case 65536:
- deviceCharacteristics |= SQLITE_IOCAP_ATOMIC64K;
- break;
- default:
- //Do nothing. deviceCharacteristics was initialized with 0 at the beginning of the function body.
- break;
- }
+ case 512:
+ deviceCharacteristics |= SQLITE_IOCAP_ATOMIC512;
+ break;
+ case 1024:
+ deviceCharacteristics |= SQLITE_IOCAP_ATOMIC1K;
+ break;
+ case 2048:
+ deviceCharacteristics |= SQLITE_IOCAP_ATOMIC2K;
+ break;
+ case 4096:
+ deviceCharacteristics |= SQLITE_IOCAP_ATOMIC4K;
+ break;
+ case 8192:
+ deviceCharacteristics |= SQLITE_IOCAP_ATOMIC8K;
+ break;
+ case 16384:
+ deviceCharacteristics |= SQLITE_IOCAP_ATOMIC16K;
+ break;
+ case 32768:
+ deviceCharacteristics |= SQLITE_IOCAP_ATOMIC32K;
+ break;
+ case 65536:
+ deviceCharacteristics |= SQLITE_IOCAP_ATOMIC64K;
+ break;
+ default:
+ //Do nothing. deviceCharacteristics was initialized with 0 at the beginning of the function body.
+ break;
}
return deviceCharacteristics;
}
@@ -2215,7 +2238,7 @@
{
SQLUTRACE_PROFILER(aVfs);
__OS_CALL(EOsVfsOpen, 0, 0);
- __OSTIME_COUNTER(TheOsCallTicks[EOsVfsOpen], ::OsCallProfile(EFalse, EOsVfsOpen), 0, 0);
+ __OSTIME_COUNTER(TheOsCallTicks[EOsVfsOpen], ::OsCallProfile(EFalse, EOsVfsOpen), 0, 0, aDbFile, aFileName);
COsLayerData& osLayerData = COsLayerData::Instance();
TFileName fname;
if(aFileName && !::ConvertToUnicode(aFileName, fname))
@@ -2287,8 +2310,7 @@
__FS_CALL(EFsOpFileOpen, 0);
err = dbFile.iFileBuf.Open(osLayerData.iFs, fname, fmode);
- if(err == KErrNone && ((aFlags & SQLITE_OPEN_MAIN_JOURNAL) || (aFlags & SQLITE_OPEN_TEMP_JOURNAL) ||
- (aFlags & SQLITE_OPEN_SUBJOURNAL) || (aFlags & SQLITE_OPEN_MASTER_JOURNAL)))
+ if(err == KErrNone && (aFlags & KJournalFileTypeBitMask))
{
err = TVfs::DoFileSizeCorruptionCheck(dbFile, fname, fmode);
}
@@ -2338,8 +2360,7 @@
(void)dbFile.iFileBuf.SetReadAheadSize(dbFile.iSectorSize, recReadBufSize);
}
#ifdef _SQLPROFILER
- dbFile.iIsJournal = (aFlags & SQLITE_OPEN_MAIN_JOURNAL) || (aFlags & SQLITE_OPEN_TEMP_JOURNAL) ||
- (aFlags & SQLITE_OPEN_SUBJOURNAL) || (aFlags & SQLITE_OPEN_MASTER_JOURNAL);
+ dbFile.iIsJournal = aFlags & KJournalFileTypeBitMask;
#endif
return err == KErrNone ? SQLITE_OK : (err == KErrNoMemory ? SQLITE_IOERR_NOMEM : SQLITE_CANTOPEN);
}
@@ -2366,7 +2387,7 @@
{
SQLUTRACE_PROFILER(aVfs);
__OS_CALL(EOsVfsDelete, 0, 0);
- __OSTIME_COUNTER(TheOsCallTicks[EOsVfsDelete], ::OsCallProfile(EFalse, EOsVfsDelete), 0, 0);
+ __OSTIME_COUNTER(TheOsCallTicks[EOsVfsDelete], ::OsCallProfile(EFalse, EOsVfsDelete), 0, 0, 0, aFileName);
COsLayerData& osLayerData = COsLayerData::Instance();
TBuf<KMaxFileName + 1> fname;
if(!::ConvertToUnicode(aFileName, fname))
@@ -2414,7 +2435,7 @@
{
SQLUTRACE_PROFILER(aVfs);
__OS_CALL(EOsVfsAccess, 0, 0);
- __OSTIME_COUNTER(TheOsCallTicks[EOsVfsAccess], ::OsCallProfile(EFalse, EOsVfsAccess), aFlags, 0);
+ __OSTIME_COUNTER(TheOsCallTicks[EOsVfsAccess], ::OsCallProfile(EFalse, EOsVfsAccess), aFlags, 0, 0, aFileName);
COsLayerData& osLayerData = COsLayerData::Instance();
TBuf<KMaxFileName + 1> fname;
if(!::ConvertToUnicode(aFileName, fname))
@@ -2491,7 +2512,7 @@
{
SQLUTRACE_PROFILER(aVfs);
__OS_CALL(EOsVfsFullPathName, 0, 0);
- __OSTIME_COUNTER(TheOsCallTicks[EOsVfsFullPathName], ::OsCallProfile(EFalse, EOsVfsFullPathName), aBufLen, 0);
+ __OSTIME_COUNTER(TheOsCallTicks[EOsVfsFullPathName], ::OsCallProfile(EFalse, EOsVfsFullPathName), aBufLen, 0, 0, aRelative);
COsLayerData& osLayerData = COsLayerData::Instance();
osLayerData.StoreFhData(NULL, EFalse);
//Convert the received file name to UTF16
@@ -2538,7 +2559,7 @@
{
SQLUTRACE_PROFILER(aVfs);
__OS_CALL(EOsVfsRandomness, 0, 0);
- __OSTIME_COUNTER(TheOsCallTicks[EOsVfsRandomness], ::OsCallProfile(EFalse, EOsVfsRandomness), aBufLen, 0);
+ __OSTIME_COUNTER(TheOsCallTicks[EOsVfsRandomness], ::OsCallProfile(EFalse, EOsVfsRandomness), aBufLen, 0, 0, 0);
COsLayerData& osLayerData = COsLayerData::Instance();
const TInt KRandIterations = aBufLen / sizeof(int);
for(TInt i=0;i<KRandIterations;++i)
@@ -2562,7 +2583,7 @@
{
SQLUTRACE_PROFILER(aVfs);
__OS_CALL(EOsVfsSleep, 0, 0);
- __OSTIME_COUNTER(TheOsCallTicks[EOsVfsSleep], ::OsCallProfile(EFalse, EOsVfsSleep), aMicrosec, 0);
+ __OSTIME_COUNTER(TheOsCallTicks[EOsVfsSleep], ::OsCallProfile(EFalse, EOsVfsSleep), aMicrosec, 0, 0, 0);
User::AfterHighRes(TTimeIntervalMicroSeconds32(aMicrosec));
return aMicrosec;
}
@@ -2582,7 +2603,7 @@
{
SQLUTRACE_PROFILER(aVfs);
__OS_CALL(EOsVfsCurrentTime, 0, 0);
- __OSTIME_COUNTER(TheOsCallTicks[EOsVfsCurrentTime], ::OsCallProfile(EFalse, EOsVfsCurrentTime), 0, 0);
+ __OSTIME_COUNTER(TheOsCallTicks[EOsVfsCurrentTime], ::OsCallProfile(EFalse, EOsVfsCurrentTime), 0, 0, 0, 0);
TTime now;
now.UniversalTime();
TDateTime date = now.DateTime();
@@ -2618,7 +2639,7 @@
{
SQLUTRACE_PROFILER(aVfs);
__OS_CALL(EOsVfsGetLastError, 0, 0);
- __OSTIME_COUNTER(TheOsCallTicks[EOsVfsGetLastError], ::OsCallProfile(EFalse, EOsVfsGetLastError), 0, 0);
+ __OSTIME_COUNTER(TheOsCallTicks[EOsVfsGetLastError], ::OsCallProfile(EFalse, EOsVfsGetLastError), 0, 0, 0, 0);
return 0;
}
@@ -2631,11 +2652,9 @@
Memory allocation routine.
-EXPORT_C required to match IMPORT_C in stdlib.h and avoid compiler warning
-
@internalComponent
*/
-extern "C" EXPORT_C void* sqlite3SymbianMalloc(size_t aSize)
+extern "C" void* sqlite3SymbianMalloc(size_t aSize)
{
__MEM_CALL(EMemOpAlloc, aSize, 0);
return Allocator().Alloc(aSize);
@@ -2646,11 +2665,9 @@
Memory reallocation routine.
-EXPORT_C required to match IMPORT_C in stdlib.h and avoid compiler warning
-
@internalComponent
*/
-extern "C" EXPORT_C void* sqlite3SymbianRealloc(void* aPtr, size_t aSize)
+extern "C" void* sqlite3SymbianRealloc(void* aPtr, size_t aSize)
{
#ifdef _SQLPROFILER
TInt size = Allocator().AllocLen(aPtr);
@@ -2664,11 +2681,9 @@
Memory free routine.
-EXPORT_C required to match IMPORT_C in stdlib.h and avoid compiler warning
-
@internalComponent
*/
-extern "C" EXPORT_C void sqlite3SymbianFree(void* aPtr)
+extern "C" void sqlite3SymbianFree(void* aPtr)
{
#ifdef _SQLPROFILER
TInt size = Allocator().AllocLen(aPtr);
--- a/persistentstorage/sql/SQLite/callback.c Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/SQLite/callback.c Thu May 27 14:29:47 2010 +0300
@@ -217,7 +217,7 @@
pColl = db->pDfltColl;
}
assert( SQLITE_UTF8==1 && SQLITE_UTF16LE==2 && SQLITE_UTF16BE==3 );
- assert( enc>=SQLITE_UTF8 && enc<=SQLITE_UTF16BE );
+ /*assert( enc>=SQLITE_UTF8 && enc<=SQLITE_UTF16BE );*/
if( pColl ) pColl += enc-1;
return pColl;
}
--- a/persistentstorage/sql/SRC/Client/SqlDbSession.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/SRC/Client/SqlDbSession.cpp Thu May 27 14:29:47 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -196,16 +196,14 @@
TPtr8 bufPtr = buf->Des();
RDesWriteStream out(bufPtr);
TRAPD(err, SerializeToStreamL(out));
- if(err == KErrNone)
- {
- TUint32 arg0 = (TUint32)bufPtr.Length() | (aReadOnly ? 0x80000000 : 0);
- TIpcArgs ipcArgs(arg0, &bufPtr);
- err = aDbFile.TransferToServer(ipcArgs, 2, 3);
- if(err == KErrNone)
- {
- err = iDbSession.SendReceive(ESqlSrvDbAttachFromHandle, ipcArgs);
- }
- }
+ __SQLASSERT(err == KErrNone, ESqlPanicInternalError);//"Write to descriptor" streaming operatons can't fail
+ TUint32 arg0 = (TUint32)bufPtr.Length() | (aReadOnly ? 0x80000000 : 0);
+ TIpcArgs ipcArgs(arg0, &bufPtr);
+ err = aDbFile.TransferToServer(ipcArgs, 2, 3);
+ if(err == KErrNone)
+ {
+ err = iDbSession.SendReceive(ESqlSrvDbAttachFromHandle, ipcArgs);
+ }
delete buf;
return err;
}
--- a/persistentstorage/sql/SRC/Client/SqlResourceProfiler.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/SRC/Client/SqlResourceProfiler.cpp Thu May 27 14:29:47 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -18,6 +18,8 @@
#include "SqlDatabaseImpl.h"
+#pragma BullseyeCoverage off
+
/**
Initializes TSqlResourceProfiler data members with their default values.
@@ -154,3 +156,5 @@
}
#endif//_SQLPROFILER
+
+#pragma BullseyeCoverage on
--- a/persistentstorage/sql/SRC/Client/SqlResourceTest.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/SRC/Client/SqlResourceTest.cpp Thu May 27 14:29:47 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -23,6 +23,8 @@
//////////////////////// TSqlResourceTestData /////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////
+#pragma BullseyeCoverage off
+
#ifdef _DEBUG
/**
@@ -274,3 +276,5 @@
}
#endif//_DEBUG
+
+#pragma BullseyeCoverage on
--- a/persistentstorage/sql/SRC/Client/SqlStatementImpl.inl Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/SRC/Client/SqlStatementImpl.inl Thu May 27 14:29:47 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -134,6 +134,8 @@
ESqlDbError or other system-wide error codes;
KErrNone Operation has completed successfully.
+@panic SqlDb 7 In _DEBUG mode, invalid column count.
+
@see CSqlStatementImpl::New()
*/
template <class DES> TInt CSqlStatementImpl::Construct(CSqlDatabaseImpl& aDatabase, const DES& aSqlStmt)
@@ -143,15 +145,13 @@
{
return err;
}
- if(iColumnCnt >= 0)
- {
- err = iColumnValueBuf.SetCount(iColumnCnt);
- if(err != KErrNone)
- {
- return err;
- }
- iColumnValBufIt.Set(iColumnValueBuf);
- }
+ __SQLASSERT(iColumnCnt >= 0, ESqlPanicInternalError);
+ err = iColumnValueBuf.SetCount(iColumnCnt);
+ if(err != KErrNone)
+ {
+ return err;
+ }
+ iColumnValBufIt.Set(iColumnValueBuf);
if(iParamCnt > 0)
{
err = iParamValueBuf.SetCount(iParamCnt);
--- a/persistentstorage/sql/SRC/Common/SqlAssert.h Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/SRC/Common/SqlAssert.h Thu May 27 14:29:47 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -46,7 +46,7 @@
static TInt Assert(const TText* aFile, TInt aLine, TInt aPanicCode);
static void Leave(const TText* aFile, TInt aLine, TInt aError);
static TInt LeaveIfError(const TText* aFile, TInt aLine, TInt aError);
- static void* LeaveIfNull(const TText* aFile, TInt aLine, void* aPtr);
+ static const void* LeaveIfNull(const TText* aFile, TInt aLine, const void* aPtr);
static TInt PanicClientL(const TText* aFile, TInt aLine, const RMessage2& aMessage, TInt aPanicCode);
static void ErrorPrint(const TDesC& aMsg, TInt aErr);
static void ErrorPrint(const TDesC& aMsg, const TDesC& aStr);
--- a/persistentstorage/sql/SRC/Common/SqlBufIterator.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/SRC/Common/SqlBufIterator.cpp Thu May 27 14:29:47 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -214,11 +214,15 @@
/**
@return Represents the content of a text or a binary field as a stream of bytes.
-@leave KErrNoMemory, out of memory condition has occured;
+@leave KErrNoMemory, out of memory condition has occured,
+ KErrArgument, the column type is not text, blob or null;
*/
MStreamBuf* TSqlBufRIterator::StreamL() const
{
__SQLASSERT(iCurrent >= iBegin && iCurrent < iEnd, ESqlPanicInternalError);
- __SQLASSERT(::IsSequenceSqlType(Type()), ESqlPanicInternalError);
+ if(!::IsSequenceSqlType(Type()))
+ {
+ __SQLLEAVE(KErrArgument);
+ }
return HReadOnlyBuf::NewL(reinterpret_cast <const TUint8*> (iBegin) + iCurrent->iPos, iCurrent->Size());
}
--- a/persistentstorage/sql/SRC/Common/SqlSrvStartup.h Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/SRC/Common/SqlSrvStartup.h Thu May 27 14:29:47 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -31,11 +31,6 @@
const TUid KSqlSrvUid3 = {0x10281E17};//The same UID is in SqlSrv.mmp file
-//Stack, Min & Max server heap size
-const TInt KSqlSrvStackSize = 0x10000; // 64K
-const TInt KSqlSrvMinHeapSize = 0x1000; // 4K
-const TInt KSqlSrvMaxHeapSize = 0x400000; // 4M
-
/**
@return SQL server version.
--- a/persistentstorage/sql/SRC/Common/SqlUtil.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/SRC/Common/SqlUtil.cpp Thu May 27 14:29:47 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -274,7 +274,7 @@
@internalComponent
*/
-void* Util::LeaveIfNull(const TText* aFile, TInt aLine, void* aPtr)
+const void* Util::LeaveIfNull(const TText* aFile, TInt aLine, const void* aPtr)
{
if(!aPtr)
{
--- a/persistentstorage/sql/SRC/Security/SqlSecurity.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/SRC/Security/SqlSecurity.cpp Thu May 27 14:29:47 2010 +0300
@@ -105,7 +105,8 @@
{
SQLUTRACE_PROFILER(this);
__SQLASSERT_ALWAYS(aPolicyType >= ESchemaPolicy && aPolicyType <= EWritePolicy, ESqlPanicBadArgument);
- return Impl().SetDbPolicy(aPolicyType, aPolicy);
+ Impl().SetDbPolicy(aPolicyType, aPolicy);
+ return KErrNone;
}
/**
--- a/persistentstorage/sql/SRC/Security/SqlSecurityImpl.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/SRC/Security/SqlSecurityImpl.cpp Thu May 27 14:29:47 2010 +0300
@@ -179,11 +179,9 @@
RSqlSecurityPolicy::EReadPolicy, RSqlSecurityPolicy::EWritePolicy.
@param aPolicy Security policy data used for setting the related database security policy.
-@return KErrNone
-
@panic SqlDb 4 In _DEBUG mode. Invalid policy type.
*/
-TInt CSqlSecurityPolicy::SetDbPolicy(RSqlSecurityPolicy::TPolicyType aPolicyType, const TSecurityPolicy& aPolicy)
+void CSqlSecurityPolicy::SetDbPolicy(RSqlSecurityPolicy::TPolicyType aPolicyType, const TSecurityPolicy& aPolicy)
{
const TInt KPolicyIndex = CSqlSecurityPolicy::PolicyType2Index(aPolicyType);
__SQLASSERT((TUint)KPolicyIndex < EPolicyTypeCount, ESqlPanicBadArgument);
@@ -194,7 +192,6 @@
//KPolicyIndex value is tested at the beginning of the function
//coverity[overrun-local]
item->iPolicy[KPolicyIndex] = aPolicy;
- return KErrNone;
}
/**
--- a/persistentstorage/sql/SRC/Security/SqlSecurityImpl.h Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/SRC/Security/SqlSecurityImpl.h Thu May 27 14:29:47 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -73,7 +73,7 @@
static CSqlSecurityPolicy* NewLC(const TSecurityPolicy& aDefaultPolicy);
virtual ~CSqlSecurityPolicy();
void SetDefaultPolicy(const TSecurityPolicy& aPolicy);
- TInt SetDbPolicy(RSqlSecurityPolicy::TPolicyType aPolicyType, const TSecurityPolicy& aPolicy);
+ void SetDbPolicy(RSqlSecurityPolicy::TPolicyType aPolicyType, const TSecurityPolicy& aPolicy);
TInt SetPolicy(RSqlSecurityPolicy::TObjectType aObjectType, const TDesC& aObjectName, RSqlSecurityPolicy::TPolicyType aPolicyType, const TSecurityPolicy& aPolicy);
TSecurityPolicy DefaultPolicy() const;
TSecurityPolicy DbPolicy(RSqlSecurityPolicy::TPolicyType aPolicyType) const;
--- a/persistentstorage/sql/SRC/Server/SqlSrvAuthorizer.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/SRC/Server/SqlSrvAuthorizer.cpp Thu May 27 14:29:47 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -279,8 +279,6 @@
case SQLITE_DETACH:// Database Name NULL
case SQLITE_REINDEX:// Index Name NULL
case SQLITE_ANALYZE:// Table Name NULL
- case SQLITE_CREATE_VTABLE:
- case SQLITE_DROP_VTABLE:
case SQLITE_FUNCTION:
break;
case SQLITE_PRAGMA:// Pragma Name 1st arg or NULL
@@ -295,7 +293,10 @@
// case SQLITE_DROP_TEMP_INDEX:// Index Name Table Name
// case SQLITE_DROP_TEMP_TABLE:// Table Name NULL
// case SQLITE_DROP_TEMP_TRIGGER:// Trigger Name Table Name
-// case SQLITE_DROP_TEMP_VIEW:// View Name NULL
+// case SQLITE_DROP_TEMP_VIEW:// View Name NULL
+//"CREATE VIRTUAL TABLE" and "DROP VIRTUAL TABLE" sql statements are not supported
+// case SQLITE_CREATE_VTABLE:
+// case SQLITE_DROP_VTABLE:
default:
__SQLASSERT(EFalse, ESqlPanicInternalError);
break;
@@ -410,10 +411,6 @@
case SQLITE_REINDEX:// Index Name NULL
case SQLITE_ANALYZE:// Table Name NULL
break;
- case SQLITE_CREATE_VTABLE:
- case SQLITE_DROP_VTABLE:
- __SQLASSERT(EFalse, ESqlPanicInternalError);
- res = SQLITE_DENY;
//No policy check
case SQLITE_FUNCTION:
break;
@@ -427,6 +424,9 @@
// case SQLITE_DROP_TEMP_TABLE:// Table Name NULL
// case SQLITE_DROP_TEMP_TRIGGER:// Trigger Name Table Name
// case SQLITE_DROP_TEMP_VIEW:// View Name NULL
+//"CREATE VIRTUAL TABLE" and "DROP VIRTUAL TABLE" sql statements are not supported
+// case SQLITE_CREATE_VTABLE:
+// case SQLITE_DROP_VTABLE:
default:
__SQLASSERT(EFalse, ESqlPanicInternalError);
break;
--- a/persistentstorage/sql/SRC/Server/SqlSrvDatabase.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/SRC/Server/SqlSrvDatabase.cpp Thu May 27 14:29:47 2010 +0300
@@ -963,12 +963,8 @@
err = StmtExec(stmtHandle);
}
}
- TInt err2 = ::FinalizeStmtHandle(stmtHandle);
+ (void)::FinalizeStmtHandle(stmtHandle);//sqlite3_finalize() fails only if an invalid statement handle is passed.
CleanupStack::PopAndDestroy();//TCleanupItem(&EnableAuthorizer, &iAuthorizerDisabled)
- if(err == KErrNone && err2 != KErrNone)
- {//::FinalizeStmtHandle() has failed
- err = err2;
- }
__SQLLEAVE_IF_ERROR(err);
TAttachCleanup attachCleanup(*this, aDbName);
@@ -1013,11 +1009,7 @@
err = StmtExec(stmtHandle);
}
}
- TInt err2 = ::FinalizeStmtHandle(stmtHandle);
- if(err == KErrNone && err2 != KErrNone)
- {//::FinalizeStmtHandle() has failed
- err = err2;
- }
+ (void)::FinalizeStmtHandle(stmtHandle);//sqlite3_finalize() fails only if an invalid statement handle is passed.
iAuthorizerDisabled = EFalse;
return err;
}
--- a/persistentstorage/sql/SRC/Server/SqlSrvDbSysSettings.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/SRC/Server/SqlSrvDbSysSettings.cpp Thu May 27 14:29:47 2010 +0300
@@ -244,7 +244,7 @@
{
__SQLLEAVE(KErrGeneral);//two "default policy" records in the table
}
- StoreDefaultSecurityPolicyL(aSecurityPolicyCon, policy, dbPolicySetFlag);
+ StoreDefaultSecurityPolicy(aSecurityPolicyCon, policy, dbPolicySetFlag);
defaultPolicySet = ETrue;
break;
case KDbObjType:
@@ -891,24 +891,23 @@
@param aPolicy Default security policy object
@param aDbPolicySetFlag Bit flag. Keeps information which database security policies are set and which aren't.
-@leave See CSqlSecurityPolicy::SetDbPolicy() return values.
@see CSqlSecurityPolicy::SetDbPolicy()
*/
-void TSqlDbSysSettings::StoreDefaultSecurityPolicyL(CSqlSecurityPolicy& aSecurityPolicyCon,
- const TSecurityPolicy& aPolicy, TInt aDbPolicySetFlag)
+void TSqlDbSysSettings::StoreDefaultSecurityPolicy(CSqlSecurityPolicy& aSecurityPolicyCon,
+ const TSecurityPolicy& aPolicy, TInt aDbPolicySetFlag)
{
aSecurityPolicyCon.SetDefaultPolicy(aPolicy);
if(!(aDbPolicySetFlag & (1 << RSqlSecurityPolicy::ESchemaPolicy)))
{
- __SQLLEAVE_IF_ERROR(aSecurityPolicyCon.SetDbPolicy(RSqlSecurityPolicy::ESchemaPolicy, aPolicy));
+ aSecurityPolicyCon.SetDbPolicy(RSqlSecurityPolicy::ESchemaPolicy, aPolicy);
}
if(!(aDbPolicySetFlag & (1 << RSqlSecurityPolicy::EReadPolicy)))
{
- __SQLLEAVE_IF_ERROR(aSecurityPolicyCon.SetDbPolicy(RSqlSecurityPolicy::EReadPolicy, aPolicy));
+ aSecurityPolicyCon.SetDbPolicy(RSqlSecurityPolicy::EReadPolicy, aPolicy);
}
if(!(aDbPolicySetFlag & (1 << RSqlSecurityPolicy::EWritePolicy)))
{
- __SQLLEAVE_IF_ERROR(aSecurityPolicyCon.SetDbPolicy(RSqlSecurityPolicy::EWritePolicy, aPolicy));
+ aSecurityPolicyCon.SetDbPolicy(RSqlSecurityPolicy::EWritePolicy, aPolicy);
}
}
@@ -936,7 +935,7 @@
{
__SQLLEAVE(KErrGeneral);
}
- __SQLLEAVE_IF_ERROR(aSecurityPolicyCon.SetDbPolicy(static_cast <RSqlSecurityPolicy::TPolicyType> (aPolicyType), aPolicy));
+ aSecurityPolicyCon.SetDbPolicy(static_cast <RSqlSecurityPolicy::TPolicyType> (aPolicyType), aPolicy);
aDbPolicySetFlag |= (1 << aPolicyType);
}
--- a/persistentstorage/sql/SRC/Server/SqlSrvDbSysSettings.h Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/SRC/Server/SqlSrvDbSysSettings.h Thu May 27 14:29:47 2010 +0300
@@ -67,7 +67,7 @@
TInt BindSecurityPolicyPrm(sqlite3_stmt* aStmtHandle, TInt aObjType, const TDesC& aObjName,
TInt aPolicyType, const TSecurityPolicy& aPolicy);
TSecurityPolicy ReadCurrSecurityPolicyL(sqlite3_stmt* aStmtHandle, TInt& aObjType, TPtrC& aObjName, TInt& aPolicyType);
- void StoreDefaultSecurityPolicyL(CSqlSecurityPolicy& aSecurityPolicyCon, const TSecurityPolicy& aPolicy, TInt aDbPolicySetFlag);
+ void StoreDefaultSecurityPolicy(CSqlSecurityPolicy& aSecurityPolicyCon, const TSecurityPolicy& aPolicy, TInt aDbPolicySetFlag);
void StoreDbSecurityPolicyL(CSqlSecurityPolicy& aSecurityPolicyCon, TInt aPolicyType,
const TSecurityPolicy& aPolicy, TInt& aDbPolicySetFlag);
void StoreDbObjSecurityPolicyL(CSqlSecurityPolicy& aSecurityPolicyCon, TInt aObjType, const TDesC& aObjName,
--- a/persistentstorage/sql/SRC/Server/SqlSrvResourceProfiler.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/SRC/Server/SqlSrvResourceProfiler.cpp Thu May 27 14:29:47 2010 +0300
@@ -662,8 +662,8 @@
TTime time;
time.UniversalTime();
TDateTime dt = time.DateTime();
- TheSqlSrvProfileTraceBuf8.Format(_L8("% 8X¬%012ld¬TME¬%02d:%02d:%02d:%06d¬Prep8=%08d¬Prep16=%08d¬Ex8=%08d¬Ex16=%08d"),
- 0, timeDiff, dt.Hour(), dt.Minute(), dt.Second(), dt.MicroSecond(),
+ TheSqlSrvProfileTraceBuf8.Format(_L8("[SQL]¬\"%X\"¬¬TME¬¬¬¬¬¬¬¬¬¬¬¬%02d:%02d:%02d:%06d¬Prep8¬%d¬Prep16¬%d¬Ex8¬%d¬Ex16¬%d"),
+ timeDiff, dt.Hour(), dt.Minute(), dt.Second(), dt.MicroSecond(),
TheSqlSrvProfilerPreparedCnt8, TheSqlSrvProfilerPreparedCnt16,
TheSqlSrvProfilerExecutedCnt8, TheSqlSrvProfilerExecutedCnt16);
if(TheSqlSrvProfilerTraceToFile)
@@ -758,19 +758,21 @@
}
if(ipcCallIdx >= 0 || (ipcCallIdx == KErrNotFound && TheSqlSrvProfilerTraceLevel == 2))
{
- TheSqlSrvProfileTraceBuf.Format(_L("% 8X¬%012ld¬IPC¬%08u¬%20.20S¬%012ld¬%010d¬%08d¬%04d¬%04d¬%04d¬%04d¬rc=%d"),
- aDbHandle,
- timeFromStart,
- aIpcCounter,
- &ipcCallName,
- ttlExecTime,
- executionTime,
- count,
- TheSqlSrvProfilerFileRead,
- TheSqlSrvProfilerFileWrite,
- TheSqlSrvProfilerFileSync,
- TheSqlSrvProfilerFileSetSize,
- aRetCode);
+ TheSqlSrvProfileTraceBuf.Format(_L("[SQL]¬\"%X\"¬%ld¬IPC¬%u¬%S¬%ld¬%d¬%d¬%d¬%d¬%d¬%d¬rc¬%d"),
+ //[SQL]
+ aDbHandle, //Database handle
+ timeFromStart, //Time from start, microseconds
+ //IPC
+ aIpcCounter, //IPC sequence counter for this database (connection)
+ &ipcCallName, //IPC call name
+ ttlExecTime, //All time spent in this IPC call type for this database (connection)
+ executionTime, //This IPC call execution time
+ count, //This IPC call sequence counter for this database (connection)
+ TheSqlSrvProfilerFileRead, //File read count, performed during this IPC
+ TheSqlSrvProfilerFileWrite, //File write count, performed during this IPC
+ TheSqlSrvProfilerFileSync, //File flush count, performed during this IPC
+ TheSqlSrvProfilerFileSetSize, //File set size count, performed during this IPC
+ aRetCode); //IPC call - return code
SqlSrvProfilePrintf(ESqlSrvProfilerNonSqlTrace);
}
}
@@ -788,12 +790,14 @@
TPtrC ipcCallName;
(void)SqlIpcTraceIdxAndName(aFuncCode, ipcCallName);
TInt64 timeFromStart = SqlTimeFromStartUs();
- TheSqlSrvProfileTraceBuf.Format(_L("% 8X¬%012ld¬ERR¬%08u¬%20.20S¬err=%d"),
- aDbHandle,
- timeFromStart,
- aIpcCounter,
- &ipcCallName,
- aError);
+ TheSqlSrvProfileTraceBuf.Format(_L("[SQL]¬\"%X\"¬%ld¬ERR¬%u¬%S¬¬¬¬¬¬¬¬err¬%d"),
+ //[SQL]
+ aDbHandle, //Database (connection) handle
+ timeFromStart, //Time from start, microseconds
+ //ERR
+ aIpcCounter, //IPC sequence counter for this database (connection)
+ &ipcCallName, //IPC call name
+ aError); //IPC call - return code
SqlSrvProfilePrintf(ESqlSrvProfilerNonSqlTrace);
}
}
@@ -823,13 +827,13 @@
_LIT(KEmptyStr, "");
if(pos == 0)
{
- line.Format(_L("% 8X¬%012ld¬SQL¬%12.12S¬"), aDbHandle, timeFromStart, aPrepare ? &KPrepare : &KExec);
+ line.Format(_L("[SQL]¬\"%X\"¬%ld¬SQL¬¬%S¬¬¬¬¬¬¬¬¬¬"), aDbHandle, timeFromStart, aPrepare ? &KPrepare : &KExec);
}
else
{
if(!TheSqlSrvProfilerTraceToFile)
{
- line.Format(_L("% 8X¬%012ld¬SQL¬%12.12S¬"), aDbHandle, timeFromStart, &KEmptyStr);
+ line.Format(_L("[SQL]¬\"%X\"¬%ld¬SQL¬¬%S¬¬¬¬¬¬¬¬¬¬"), aDbHandle, timeFromStart, &KEmptyStr);
}
}
TInt l = Min(len, (line.MaxLength() - line.Length()));
@@ -868,13 +872,13 @@
_LIT(KEmptyStr, "");
if(pos == 0)
{
- line.Format(_L("% 8X¬%012ld¬SQL¬%12.12S¬"), aDbHandle, timeFromStart, aPrepare ? &KPrepare : &KExec);
+ line.Format(_L("[SQL]¬\"%X\"¬%ld¬SQL¬¬%S¬¬¬¬¬¬¬¬¬¬"), aDbHandle, timeFromStart, aPrepare ? &KPrepare : &KExec);
}
else
{
if(!TheSqlSrvProfilerTraceToFile)
{
- line.Format(_L("% 8X¬%012ld¬SQL¬%12.12S¬"), aDbHandle, timeFromStart, &KEmptyStr);
+ line.Format(_L("[SQL]¬\"%X\"¬%ld¬SQL¬¬%S¬¬¬¬¬¬¬¬¬¬"), aDbHandle, timeFromStart, &KEmptyStr);
}
}
TInt l = Min(len, (line.MaxLength() - line.Length()));
@@ -904,7 +908,7 @@
return;
}
TInt64 timeFromStart = SqlTimeFromStartUs();
- TheSqlSrvProfileTraceBuf.Format(_L("% 08X¬%012ld¬CRE¬%S"),
+ TheSqlSrvProfileTraceBuf.Format(_L("[SQL]¬\"%X\"¬%ld¬CRE¬¬¬¬¬¬¬¬¬¬¬¬%S"),
aDbHandle,
timeFromStart,
&aDbName);
@@ -926,7 +930,7 @@
return;
}
TInt64 timeFromStart = SqlTimeFromStartUs();
- TheSqlSrvProfileTraceBuf.Format(_L("% 8X¬%012ld¬OPN¬%S"),
+ TheSqlSrvProfileTraceBuf.Format(_L("[SQL]¬\"%X\"¬%ld¬OPN¬¬¬¬¬¬¬¬¬¬¬¬%S"),
aDbHandle,
timeFromStart,
&aDbName);
@@ -944,7 +948,7 @@
return;
}
TInt64 timeFromStart = SqlTimeFromStartUs();
- TheSqlSrvProfileTraceBuf.Format(_L("% 8X¬%012ld¬CSE"),
+ TheSqlSrvProfileTraceBuf.Format(_L("[SQL]¬\"%X\"¬%ld¬CSE"),
aDbHandle,
timeFromStart);
SqlSrvProfilePrintf(ESqlSrvProfilerNonSqlTrace);
@@ -986,7 +990,7 @@
RDebug::Print(_L("SQL trace file creation failed with err=%d"), err);
}
}
- TheSqlSrvProfileTraceBuf.Format(_L("% 8X¬%012ld¬SRV¬START"), 0, timeFromStart);
+ TheSqlSrvProfileTraceBuf.Format(_L("[SQL]¬¬%ld¬SRV¬¬Start"), timeFromStart);
SqlSrvProfilePrintf(ESqlSrvProfilerNonSqlTrace);
}
@@ -994,7 +998,7 @@
void SqlPrintServerStop()
{
TInt64 timeFromStart = SqlTimeFromStartUs();
- TheSqlSrvProfileTraceBuf.Format(_L("% 8X¬%012ld¬SRV¬STOP"), 0, timeFromStart);
+ TheSqlSrvProfileTraceBuf.Format(_L("[SQL]¬¬%ld¬SRV¬¬Stop"), timeFromStart);
SqlSrvProfilePrintf(ESqlSrvProfilerNonSqlTrace);
if(TheSqlSrvProfilerTraceToFile)
{
--- a/persistentstorage/sql/SRC/Server/SqlSrvSession.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/SRC/Server/SqlSrvSession.cpp Thu May 27 14:29:47 2010 +0300
@@ -9,7 +9,7 @@
// Nokia Corporation - initial contribution.
//
// Contributors:
-// NTT DOCOMO, INC - Fix for defect 1915 "SQL server panics when using long column type strings"
+// NTT DOCOMO, INC - Fix for Bug 1915 "SQL server panics when using long column type strings"
//
// Description:
//
@@ -479,6 +479,8 @@
//////////////////////////// Profiler operations ///////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////
+#pragma BullseyeCoverage off
+
/**
Retrieves the counter values for the specified profiling counter.
@@ -515,6 +517,8 @@
}
}
+#pragma BullseyeCoverage on
+
///////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////// Database operations ///////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -1082,6 +1086,7 @@
Arg 3: [in] database file handle
@panic SqlDb 2 Client panic. iDatabase is NULL (the database object is not created yet).
+@panic SqlDb 4 Client panic. Invalid IPC data, an indication of a problme in client side sql library.
*/
void CSqlSrvSession::DbAttachFromHandleL(const RMessage2& aMessage)
{
@@ -1089,10 +1094,7 @@
//Read-only flag, buffer length, buffer allocation
TBool readOnly = (aMessage.Int0() & 0x80000000) != 0;
const TInt KBufLen = aMessage.Int0() & 0x7FFFFFFF;
- if(KBufLen <= 0)
- {
- __SQLLEAVE(KErrArgument);
- }
+ __SQLPANIC_CLIENT(KBufLen > 0, aMessage, ESqlPanicBadArgument);
HBufC8* buf = HBufC8::NewLC(KBufLen);
TPtr8 bufPtr = buf->Des();
aMessage.ReadL(1, bufPtr);
@@ -1198,16 +1200,16 @@
@return The blob stream handle
@leave KErrNoMemory, An out of memory condition has occurred;
- KErrArgument, The IPC data buffer length is invalid, or the ROWID is invalid,
- or UTF-16 to UTF-8 string conversion failed;
+ KErrArgument, The ROWID is invalid or UTF-16 to UTF-8 string conversion failed;
KErrBadDescriptor The transferred data is bigger than the specified length;
KErrBadName, The table name, column name or database name has an invalid length;
KErrPermissionDenied, The client does not have the required security capabilites for this operation;
Note that the function may also leave with some other system wide errors or
database specific errors categorised as ESqlDbError.
-@panic SqlDb 2 Client panic. The database object is not yet created (iDatabase is NULL)
-@panic SqlDb 3 Client panic. Failed to create a blob stream handle
+@panic SqlDb 2 Client panic. The database object is not yet created (iDatabase is NULL).
+@panic SqlDb 3 Client panic. Failed to create a blob stream handle.
+@panic SqlDb 4 Client panic. IPC buffer length is 0.
Usage of the IPC call arguments:
Arg 0: [in] The length of the IPC data buffer
@@ -1218,13 +1220,11 @@
{
__SQLPANIC_CLIENT(iDatabase != NULL, aMessage, ESqlPanicInvalidObj);
+ TInt ipcPrmLen = aMessage.Int0();
+ __SQLPANIC_CLIENT(ipcPrmLen > 0, aMessage, ESqlPanicBadArgument);
+
iIpcStreams.AllocL();
- TInt ipcPrmLen = aMessage.Int0();
- if(ipcPrmLen < 1)
- {
- __SQLLEAVE(KErrArgument);
- }
TDes8& ipcPrmDes = ReadString8ZL(aMessage, 1, ipcPrmLen);
RDesReadStream strm(ipcPrmDes);
@@ -1578,8 +1578,8 @@
The string will be zero terminated after the "read" operation.
Returns TDes8 reference pointing to the zero-terminated string.
-@leave KErrBadDescriptor The transferred data length is bigger than the aByteLen value
-
+@panic SqlDb 3 Client panic. The string length is not equal to aByteLen. If happens then it is an indication of a
+ problem inside client side sql library.
@panic SqlDb 4 Client panic. Negative aByteLen value.
*/
TDes8& CSqlSrvSession::ReadString8ZL(const RMessage2& aMessage, TInt aArgNum, TInt aByteLen)
@@ -1588,10 +1588,7 @@
TDes8& buf = Server().GetBuf8L(aByteLen + 1);
aMessage.ReadL(aArgNum, buf);
SQLPROFILER_REPORT_IPC(ESqlIpcRead, aByteLen);
- if(buf.Length() > aByteLen)
- {
- __SQLLEAVE(KErrBadDescriptor);
- }
+ __SQLPANIC_CLIENT(buf.Length() == aByteLen, aMessage, ESqlPanicBadHandle);
buf.Append(TChar(0));
return buf;
}
@@ -1601,8 +1598,8 @@
The string will be zero terminated after the "read" operation.
Returns TDes16 reference pointing to the zero-terminated string.
-@leave KErrBadDescriptor The transferred data length is bigger than the aCharLen value
-
+@panic SqlDb 3 Client panic. The string length is not equal to aCharLen. If happens then it is an indication of a
+ problem inside client side sql library.
@panic SqlDb 4 Client panic. Negative aCharLen value.
*/
TDes16& CSqlSrvSession::ReadString16ZL(const RMessage2& aMessage, TInt aArgNum, TInt aCharLen)
@@ -1611,10 +1608,7 @@
TDes16& buf = Server().GetBuf16L(aCharLen + 1);
aMessage.ReadL(aArgNum, buf);
SQLPROFILER_REPORT_IPC(ESqlIpcRead, (aCharLen * sizeof(TText)));
- if(buf.Length() > aCharLen)
- {
- __SQLLEAVE(KErrBadDescriptor);
- }
+ __SQLPANIC_CLIENT(buf.Length() == aCharLen, aMessage, ESqlPanicBadHandle);
buf.Append(TChar(0));
return buf;
}
@@ -1623,8 +1617,8 @@
Reads a 16-bit string with "aCharLen" character length, which is in "aArgNum" argument of aMessage.
Returns TDes16 reference pointing to the string.
-@leave KErrBadDescriptor The transferred data length is bigger than the aCharLen value
-
+@panic SqlDb 3 Client panic. The string length is not equal to aCharLen. If happens then it is an indication of a
+ problem inside client side sql library.
@panic SqlDb 4 Client panic. Negative aCharLen value.
*/
TDes16& CSqlSrvSession::ReadString16L(const RMessage2& aMessage, TInt aArgNum, TInt aCharLen)
@@ -1633,10 +1627,7 @@
TDes16& buf = Server().GetBuf16L(aCharLen);
aMessage.ReadL(aArgNum, buf);
SQLPROFILER_REPORT_IPC(ESqlIpcRead, (aCharLen * sizeof(TText)));
- if(buf.Length() > aCharLen)
- {
- __SQLLEAVE(KErrBadDescriptor);
- }
+ __SQLPANIC_CLIENT(buf.Length() == aCharLen, aMessage, ESqlPanicBadHandle);
return buf;
}
--- a/persistentstorage/sql/SRC/Server/SqlSrvStatement.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/SRC/Server/SqlSrvStatement.cpp Thu May 27 14:29:47 2010 +0300
@@ -217,10 +217,6 @@
__SQLASSERT(iStmtHandle != NULL, ESqlPanicInvalidObj);
(void)sqlite3SymbianLastOsError();//clear last OS error
- if(sqlite3_expired(iStmtHandle))
- {
- __SQLLEAVE_IF_ERROR(KSqlErrStmtExpired);
- }
TSqlBufRIterator it;
it.Set(aParamBuf);
@@ -516,10 +512,6 @@
__SQLASSERT(aParamIndex < iParamBufArray.Count(), ESqlPanicBadArgument);
__SQLASSERT(iParamBufArray[aParamIndex] != NULL, ESqlPanicBadArgument);
(void)sqlite3SymbianLastOsError();//clear last OS error
- if(sqlite3_expired(iStmtHandle))
- {
- __SQLLEAVE_IF_ERROR(KSqlErrStmtExpired);
- }
//Bind the parameter value.
//SQLITE_STATIC is used as an argument, because the text/blob data will be kept and can be used by the next bind call
HSqlSrvStmtParamBuf& paramBuf = *iParamBufArray[aParamIndex];
--- a/persistentstorage/sql/SRC/Server/SqlSrvStatementUtil.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/SRC/Server/SqlSrvStatementUtil.cpp Thu May 27 14:29:47 2010 +0300
@@ -203,6 +203,7 @@
static TInt DoSingleStmtExec16(sqlite3 *aDbHandle, const TDesC16& aSql)
{
__SQLASSERT(aDbHandle != NULL, ESqlPanicInvalidObj);
+ __SQLASSERT(aSql.Length() > 0 ? (TInt)aSql[aSql.Length() - 1] == 0 : ETrue, ESqlPanicBadArgument);
sqlite3_stmt* stmtHandle = NULL;
const void* stmtTail = NULL;
//sqlite3_prepare16_v2() expects parameter #3 to be one of the following:
@@ -223,11 +224,7 @@
__SQLASSERT(err != SQLITE_OK, ESqlPanicInternalError);
}
}
- TInt err2 = sqlite3_finalize(stmtHandle);
- if(err == SQLITE_DONE && err2 != SQLITE_OK)
- {//return the "sqlite3_finalize" error
- err = err2;
- }
+ (void)sqlite3_finalize(stmtHandle);//sqlite3_finalize() fails only if an invalid statement handle is passed.
}
return err;
}
@@ -423,15 +420,21 @@
// - aHasTail is true (possibly more than one SQL statement, separated with ";");
// - aStmtHandle is NULL;
//
-static TInt ProcessPrepareError(TInt aSqliteError, TBool aHasTail, sqlite3_stmt* aStmtHandle)
+static TInt ProcessPrepareError(TInt aSqliteError, TBool aHasTail, sqlite3_stmt*& aStmtHandle)
{
if(aSqliteError != SQLITE_OK)
{
return ::Sql2OsErrCode(aSqliteError, sqlite3SymbianLastOsError());
}
else if(aHasTail || !aStmtHandle)
- {//More than one SQL statement or the SQL string is "" or ";;;" or "; ;; ;".
- //Report it as an error, because there is no statement handle.
+ {//Case 1:
+ // More than one SQL statement or the SQL string is "" or ";;;" or "; ;; ;".
+ // Report it as an error, because there is no statement handle.
+ //Case 2:
+ // Non-null aHasTail. In this case the SQL string contains more than one SQL statement.
+ // The statement handle is not null. The statement has to be finialized before reporting the error.
+ (void)FinalizeStmtHandle(aStmtHandle);
+ aStmtHandle = NULL;
return KErrArgument;
}
return KErrNone;
@@ -544,12 +547,7 @@
__SQLASSERT(aStmtHandle != NULL, ESqlPanicInvalidObj);
(void)sqlite3SymbianLastOsError();//clear last OS error
-
- if(sqlite3_expired(aStmtHandle))
- {
- return KSqlErrStmtExpired;
- }
-
+
TInt err;
while((err = sqlite3_step(aStmtHandle)) == SQLITE_ROW)
{
@@ -594,11 +592,6 @@
(void)sqlite3SymbianLastOsError();//clear last OS error
- if(sqlite3_expired(aStmtHandle))
- {
- return KSqlErrStmtExpired;
- }
-
TInt err = sqlite3_step(aStmtHandle);
if(err == SQLITE_ERROR) //It may be "out of memory" problem
{
@@ -628,11 +621,6 @@
(void)sqlite3SymbianLastOsError();//clear last OS error
- if(sqlite3_expired(aStmtHandle))
- {
- return KSqlErrStmtExpired;
- }
-
TInt err = sqlite3_reset(aStmtHandle);
return ::Sql2OsErrCode(err, sqlite3SymbianLastOsError());
}
@@ -711,14 +699,9 @@
if(err == KSqlAtRow)
{
aPragmaValue = sqlite3_column_int(stmtHandle, 0);
- __SQLASSERT(aPragmaValue >= 0, ESqlPanicInternalError);
- err = KErrNone;
+ err = aPragmaValue >= 0 ? KErrNone : KErrCorrupt;
}
- TInt err2 = FinalizeStmtHandle(stmtHandle);
- if(err == KErrNone && err2 != KErrNone)
- {//FinalizeStmtHandle() has failed
- err = err2;
- }
+ (void)FinalizeStmtHandle(stmtHandle);//sqlite3_finalize() fails only if an invalid statement handle is passed.
return err;
}
@@ -752,11 +735,7 @@
aPragmaValue.Copy(ptr);
err = KErrNone;
}
- TInt err2 = FinalizeStmtHandle(stmtHandle);
- if(err == KErrNone && err2 != KErrNone)
- {//::FinalizeStmtHandle() has failed
- err = err2;
- }
+ (void)FinalizeStmtHandle(stmtHandle);//sqlite3_finalize() fails only if an invalid statement handle is passed.
return err;
}
@@ -987,11 +966,7 @@
__SQLASSERT(err != SQLITE_OK, ESqlPanicInternalError);
}
}
- TInt err2 = sqlite3_finalize(stmtHandle);
- if(err == SQLITE_DONE && err2 != SQLITE_OK)
- {//use the "sqlite3_finalize" error
- err = err2;
- }
+ (void)sqlite3_finalize(stmtHandle);//sqlite3_finalize() fails only if an invalid statement handle is passed.
}
err = ::Sql2OsErrCode(err, sqlite3SymbianLastOsError());
if(err == KSqlAtEnd)
@@ -1004,6 +979,11 @@
/**
Finalizes the statement handle.
+Although the function can return an error, it is ok not to check the returned error,
+because sqlite3_finalize() fails only if invalid statement handle is passed as an argument.
+
+@return KErrNone, Operation completed successfully;
+ Other system-wide error codes or SQL errors of ESqlDbError type.
@internalComponent
*/
--- a/persistentstorage/sql/SRC/Server/SqlSrvUtil.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/SRC/Server/SqlSrvUtil.cpp Thu May 27 14:29:47 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -147,10 +147,6 @@
{
__SQLASSERT(aIn.Length() <= KMaxFileName, ESqlPanicBadArgument);
__SQLASSERT(aOut.MaxLength() >= KMaxFileName, ESqlPanicBadArgument);
- if(aIn.Length() > KMaxFileName || aOut.MaxLength() < KMaxFileName)
- {
- return EFalse;
- }
TBuf16<KMaxFileName + 1> des;
des.Copy(aIn);
des.Append(TChar(0));
--- a/persistentstorage/sql/TEST/t_sqlapi.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqlapi.cpp Thu May 27 14:29:47 2010 +0300
@@ -410,6 +410,19 @@
TEST(rc==KSqlErrNotDb || rc==KErrNone);
db.Close();
+ //An attempt to open database with name containing non-convertible characters.
+ TBuf<6> invName;
+ invName.SetLength(6);
+ invName[0] = TChar('c');
+ invName[1] = TChar(':');
+ invName[2] = TChar('\\');
+ invName[3] = TChar(0xD800);
+ invName[4] = TChar(0xFC00);
+ invName[5] = TChar(0x0000);
+ rc = db.Open(invName);
+ db.Close();
+ TEST(rc != KErrNone);
+
//Copy the corrupted database file on drive C:
TEST2(fs.Connect(), KErrNone);
rc = BaflUtils::CopyFile(fs, KDbPath10, KTestDbName3);
@@ -792,6 +805,7 @@
_LIT8(KStmt19, "INSERT INTO BBB(Fld1, Fld2, Fld3, Fld4, Fld5, Fld6)\
VALUES(:V1, :V2, :V3, :V4, :V5, :V6)");
_LIT8(KStmt20, "SELECT * FROM BBB");
+_LIT8(KStmt21, "SELECT fld1, fld2 FROM AAA;SELECT fld1, fld2 FROM AAA");
/**
@SYMTestCaseID SYSLIB-SQL-CT-1606
@@ -824,6 +838,10 @@
ExecSqlStmt(db, stmt, KErrNone);
stmt.Close();
+ //String containg more than one SQL statement.
+ stmt = PrepareSqlStmt<DES, BUF>(db, KStmt21, KErrArgument);
+ stmt.Close();
+
//SQL statement without parameters. Insert a record into the table.
stmt = PrepareSqlStmt<DES, BUF>(db, KStmt13, KErrNone);
ExecSqlStmt(db, stmt, KErrNone);
@@ -1088,6 +1106,17 @@
rc = stmt.Next();
TEST2(rc, KSqlAtRow);
+ //An attempt to read integer column using binary stream
+ RSqlColumnReadStream strm2;
+ rc = strm2.ColumnBinary(stmt, 0);
+ strm2.Close();
+ TEST2(rc, KErrArgument);
+
+ //An attempt to read integer column using text stream
+ rc = strm2.ColumnText(stmt, 0);
+ strm2.Close();
+ TEST2(rc, KErrArgument);
+
//Read the long text column using a stream
RSqlColumnReadStream columnStream;
rc = columnStream.ColumnText(stmt, 1);
@@ -2358,6 +2387,48 @@
(void)RSqlDatabase::Delete(KTestDbName1);
}
+/**
+@SYMTestCaseID PDS-SQL-CT-4205
+@SYMTestCaseDesc "PRAGMA count_changes" test.
+ When "count_changes" pragma is ON, sqlite3_step() is called two times by the
+ SQL server, before getting the SQLITE_DONE return code.
+ Everything else is the same (statement processing, etc.).
+@SYMTestPriority High
+@SYMTestActions "PRAGMA count_changes" test.
+@SYMTestExpectedResults Test must not fail
+*/
+void CountChangesTest()
+ {
+ (void)RSqlDatabase::Delete(KTestDbName1);
+ RSqlDatabase db;
+ TInt err = db.Create(KTestDbName1);
+ TEST2(err, KErrNone);
+ err = db.Exec(_L("CREATE TABLE A(I INTEGER)"));
+ TEST(err >= 0);
+
+ err = db.Exec(_L("PRAGMA count_changes=ON"));
+ TEST(err >= 0);
+
+ err = db.Exec(_L("INSERT INTO A VALUES(1)"));
+ TEST2(err, 1);
+
+ err = db.Exec(_L8("INSERT INTO A VALUES(2)"));
+ TEST2(err, 1);
+
+ RSqlStatement stmt;
+ err = stmt.Prepare(db, _L("DELETE FROM A WHERE I>=1 AND I<=2"));
+ TEST2(err, KErrNone);
+ err = stmt.Exec();
+ TEST2(err, 2);
+ stmt.Close();
+
+ err = db.Exec(_L("PRAGMA count_changes=OFF"));
+ TEST(err >= 0);
+
+ db.Close();
+ (void)RSqlDatabase::Delete(KTestDbName1);
+ }
+
void DoTestsL()
{
TheTest.Start(_L(" @SYMTestCaseID:SYSLIB-SQL-CT-1601 Create/Open/Close database tests "));
@@ -2427,6 +2498,9 @@
TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-SQL-UT-4041 RSqlDatabase::Size(RSqlDatabase::TSize&) - different compaction modes tests"));
DiffCompactModeSize2Test();
+
+ TheTest.Next(_L(" @SYMTestCaseID:PDS-SQL-CT-4205 PRAGMA \"count_changes\" test"));
+ CountChangesTest();
}
TInt E32Main()
--- a/persistentstorage/sql/TEST/t_sqlapi2.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqlapi2.cpp Thu May 27 14:29:47 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -978,6 +978,23 @@
RSqlBlobReadStream strm6;
TRAP(err, strm6.OpenL(TheDb, KNullDesC, KNullDesC, 1, KNullDesC));
TEST(err != KErrNone);
+ //Attempt to open a read blob stream, where the blob column name is invalid and contains non-convertible characters.
+ TBuf<3> invName;
+ invName.SetLength(3);
+ invName[0] = TChar(0xD800);
+ invName[1] = TChar(0xFC00);
+ invName[2] = TChar(0x0000);
+ RSqlBlobReadStream strm7;
+ TRAP(err, strm7.OpenL(TheDb, _L("A"), invName, 1, KNullDesC));
+ TEST(err != KErrNone);
+ //Attempt to open a read blob stream, where the table name is invalid and contains non-convertible characters.
+ RSqlBlobReadStream strm8;
+ TRAP(err, strm8.OpenL(TheDb, invName, _L("Data"), 1, KNullDesC));
+ TEST(err != KErrNone);
+ //Attempt to open a read blob stream, where the attached db name is invalid and contains non-convertible characters.
+ RSqlBlobReadStream strm9;
+ TRAP(err, strm9.OpenL(TheDb, _L("A"), _L("Data"), 1, invName));
+ TEST(err != KErrNone);
//
err = TheDb.Detach(KAttachDb);
TEST2(err, KErrNone);
@@ -1697,6 +1714,73 @@
}
}
+/**
+@SYMTestCaseID PDS-SQL-CT-4198
+@SYMTestCaseDesc Expired SQL statements test.
+ The test creates a database and opens 2 connections to that database.
+ Connection 2 prepares couple of SELECT and INSERT statements (8-bit and 16-bit).
+ Then connection 1 renames the table used in the already prepared statements.
+ Connection 2 attempts to execute the prepared statements. The execution should fail
+ because the database schema has changed after they were prepared.
+@SYMTestActions Expired SQL statements test.
+@SYMTestExpectedResults Test must not fail
+@SYMTestPriority High
+@SYMDEF DEF145236
+*/
+void ExpiredStmtTest()
+ {
+ (void)RSqlDatabase::Delete(KTestDbName1);
+ //Create a database and create db connection 1.
+ TInt err = TheDb.Create(KTestDbName1);
+ TEST2(err, KErrNone);
+ err = TheDb.Exec(_L("CREATE TABLE A(C1 INTEGER)"));
+ TEST(err >= 0);
+ err = TheDb.Exec(_L("INSERT INTO A(C1) VALUES(1)"));
+ TEST2(err, 1);
+
+ //Create db connection 2 to the same database, as db connection 1.
+ RSqlDatabase db2;
+ err = db2.Open(KTestDbName1);
+ TEST2(err, KErrNone);
+
+ //Db connection 2. Prepare SELECT and INSERT, 8-bit and 16-bit statements.
+ RSqlStatement stmt1, stmt2, stmt3, stmt4;
+ err = stmt1.Prepare(db2, _L("SELECT * FROM A"));
+ TEST2(err, KErrNone);
+ err = stmt2.Prepare(db2, _L8("SELECT * FROM A"));
+ TEST2(err, KErrNone);
+ err = stmt3.Prepare(db2, _L("INSERT INTO A(C1) VALUES(2)"));
+ TEST2(err, KErrNone);
+ err = stmt4.Prepare(db2, _L8("INSERT INTO A(C1) VALUES(3)"));
+ TEST2(err, KErrNone);
+
+ //Modify the A table structure from the other connection
+ //err = TheDb.Exec(_L("ALTER TABLE A ADD C2 INTEGER"));
+ err = TheDb.Exec(_L("ALTER TABLE A RENAME TO B"));
+ TEST(err >= 0);
+
+ //Try to execute the already prepared statements.
+ err = stmt1.Next();
+ TEST2(err, KSqlErrSchema);
+ err = stmt1.Next();
+ TEST(err != KSqlAtRow);
+ err = stmt2.Next();
+ TEST(err != KSqlAtRow);
+ err = stmt3.Exec();
+ TEST(err < 0);
+ err = stmt4.Exec();
+ TEST(err < 0);
+ //
+ stmt4.Close();
+ stmt3.Close();
+ stmt2.Close();
+ stmt1.Close();
+ db2.Close();
+ TheDb.Close();
+ err = RSqlDatabase::Delete(KTestDbName1);
+ TEST2(err, KErrNone);
+ }
+
void DoTestsL()
{
TheTest.Start(_L(" @SYMTestCaseID:SYSLIB-SQL-UT-3512 RSqlStatement::ColumnCount() tests "));
@@ -1735,6 +1819,8 @@
ProfilerTest();
TheTest.Next( _L(" Compound SELECT, stack overflow test"));
CompoundSelectStackOverflowTest();
+ TheTest.Next(_L(" @SYMTestCaseID:PDS-SQL-CT-4198 Expired statements test"));
+ ExpiredStmtTest();
}
TInt E32Main()
--- a/persistentstorage/sql/TEST/t_sqlattach.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqlattach.cpp Thu May 27 14:29:47 2010 +0300
@@ -333,11 +333,8 @@
TEST2(err, KErrPermissionDenied);
//Attempt to detach database using DETACH sql statement directly.
- //Executed only in release mode because the server will panic in _DEBUG mode
-#ifndef _DEBUG
err = TheDb.Exec(_L("DETACH DATABASE DB2"));
TEST2(err, KErrPermissionDenied);
-#endif
err = TheDb.Detach(KAttachDb2);
TEST2(err, KErrNone);
--- a/persistentstorage/sql/TEST/t_sqlbadclient.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqlbadclient.cpp Thu May 27 14:29:47 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -18,6 +18,7 @@
#include <e32math.h>
#include <sqldb.h>
#include "SqlUtil.h"
+#include "SqlSrvStartup.h" //KSqlMajorVer, KSqlMinorVer, KSqlBuildVer
///////////////////////////////////////////////////////////////////////////////////////
@@ -172,18 +173,18 @@
class RTestSqlDbSession : public RSessionBase
{
public:
- TInt Connect();
+ TInt Connect(const TVersion& aVersion);
void Close();
TInt SendReceive(TInt aFunction);
TInt SendReceive(TInt aFunction, const TIpcArgs& aArgs);
private:
- TInt DoCreateSession();
+ TInt DoCreateSession(const TVersion& aVersion);
};
-TInt RTestSqlDbSession::Connect()
+TInt RTestSqlDbSession::Connect(const TVersion& aVersion)
{
- TInt err = DoCreateSession();
+ TInt err = DoCreateSession(aVersion);
if(err == KErrNone)
{
TIpcArgs ipcArgs(KTestDbName1().Length(), &KTestDbName1(), 0, 0);
@@ -215,18 +216,14 @@
return RSessionBase::SendReceive(aFunction, aArgs);
}
-TInt RTestSqlDbSession::DoCreateSession()
+TInt RTestSqlDbSession::DoCreateSession(const TVersion& aVersion)
{
const TInt KTimesToRetryConnection = 2;
TInt retry = KTimesToRetryConnection;
_LIT(KSqlSrvName, "!SQL Server");//SqlDb server name
- //SQL server: major version number, minor version number, build number constants.
- const TInt KSqlMajorVer = 1;
- const TInt KSqlMinorVer = 1;
- const TInt KSqlBuildVer = 0;
for(;;)
{
- TInt err = CreateSession(KSqlSrvName, TVersion(KSqlMajorVer, KSqlMinorVer, KSqlBuildVer));
+ TInt err = CreateSession(KSqlSrvName, aVersion);
if(err != KErrNotFound && err != KErrServerTerminated)
{
return err;
@@ -286,8 +283,9 @@
TTEST(p != NULL);
TThreadData& data = *p;
+ TVersion sqlSoftwareVersion(KSqlMajorVer, KSqlMinorVer, KSqlBuildVer);
RTestSqlDbSession sess;
- TInt err = sess.Connect();
+ TInt err = sess.Connect(sqlSoftwareVersion);
TTEST2(err, KErrNone);
while(++data.iIteration <= KTestIterCount)
@@ -595,13 +593,62 @@
TheTest.Printf(_L("Delete database-2, err=%d\r\n"), err);
TEST(err != KErrNone);
}
+
+/**
+@SYMTestCaseID PDS-SQL-CT-4200
+@SYMTestCaseDesc Invalid sql software version test.
+@SYMTestPriority High
+@SYMTestActions The test verifies that the SQL server checks that the software version of SQL sessions
+ to be created is less or equal to the current version of the server software.
+ If that is not true then the SQL server does not create the session annd returns KErrNotSupported.
+@SYMTestExpectedResults Test must not fail
+@SYMDEF DEF145236
+*/
+void InvalidSoftwareVersionTest()
+ {
+ (void)RSqlDatabase::Delete(KTestDbName1);
+ RSqlDatabase db;
+ TInt err = db.Create(KTestDbName1);
+ TEST2(err, KErrNone);
+ db.Close();
+ //Smaller version number
+ TVersion sqlSoftwareVersion1(1, 0, 0);
+ RTestSqlDbSession sess1;
+ err = sess1.Connect(sqlSoftwareVersion1);
+ sess1.Close();
+ TEST2(err, KErrNone);
+
+ //Bigger version number 1
+ TVersion sqlSoftwareVersion2(1, 97, 3);
+ RTestSqlDbSession sess2;
+ err = sess2.Connect(sqlSoftwareVersion2);
+ TEST2(err, KErrNotSupported);
+
+ //Bigger version number 2
+ TVersion sqlSoftwareVersion3(78, 0, 1);
+ RTestSqlDbSession sess3;
+ err = sess3.Connect(sqlSoftwareVersion3);
+ TEST2(err, KErrNotSupported);
+
+ //The current version number
+ TVersion sqlSoftwareVersion4(KSqlMajorVer, KSqlMinorVer, KSqlBuildVer);
+ RTestSqlDbSession sess4;
+ err = sess4.Connect(sqlSoftwareVersion4);
+ sess4.Close();
+ TEST2(err, KErrNone);
+
+ (void)RSqlDatabase::Delete(KTestDbName1);
+ }
+
void DoTests()
{
TheTest.Start(_L(" @SYMTestCaseID:SYSLIB-SQL-CT-1769 Bad client test "));
BadClientTest();
TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-SQL-UT-4048 Bad names test"));
BadNameTest();
+ TheTest.Next(_L(" @SYMTestCaseID:PDS-SQL-CT-4200 Invalid software version test"));
+ InvalidSoftwareVersionTest();
}
TInt E32Main()
--- a/persistentstorage/sql/TEST/t_sqlblob.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqlblob.cpp Thu May 27 14:29:47 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -1959,6 +1959,92 @@
CleanupStack::PopAndDestroy(2, blobWrBuf); // buf, blobWrBuf
}
+/**
+@SYMTestCaseID PDS-SQL-CT-4194
+@SYMTestCaseDesc The test opens a test database, creates a table with a blob column and inserts one record.
+ Then the test uses RSqlBlobWriteStream to modify the blob column content.
+ MStreamBuf::SeekL() is used to modify the blob data at specific positions.
+ Then the test uses RSqlBlobReadStream object to read the just written blob data.
+ MStreamBuf::SeekL() is used to read the column content at specific positions
+ (the same positions used during the blob write operation). The read byte values must
+ match the written byte values.
+@SYMTestPriority High
+@SYMTestActions RSqlBlobReadStream and RSqlBlobWriteStream - MStreamBuf::SeekL() test.
+@SYMTestExpectedResults Test must not fail
+@SYMDEF DEF145028
+*/
+void StreamSeekTestL()
+ {
+ TInt rc = TheDb1.Exec(_L("CREATE TABLE A(Fld1 INTEGER, Fld2 BLOB)"));
+ TEST(rc >= 0);
+
+ //Write a record to the database using a blob stream. MStreamBuf::SeekL() is used to modify the content at a specific position.
+ rc = TheDb1.Exec(_L("INSERT INTO A(Fld1, Fld2) VALUES(1, zeroblob(256))"));
+ TEST2(rc, 1);
+ RSqlBlobWriteStream strm1;
+ CleanupClosePushL(strm1);
+ strm1.OpenL(TheDb1, _L("A"), _L("Fld2"));
+ for(TInt i=0;i<256;++i)
+ {
+ strm1 << (TUint8)i;
+ }
+
+ const TInt KStreamOffset = 10;
+ const TUint8 KByte = 'z';
+ _LIT8(KData, "QWERTYUIOPASDFG");
+
+ MStreamBuf* strm1buf = strm1.Sink();
+ TEST(strm1buf != NULL);
+
+ strm1buf->SeekL(MStreamBuf::EWrite, EStreamBeginning, 0);
+ strm1buf->WriteL(&KByte, 1);
+
+ strm1buf->SeekL(MStreamBuf::EWrite, EStreamMark, KStreamOffset);
+ strm1buf->WriteL(&KByte, 1);
+
+ strm1buf->SeekL(MStreamBuf::EWrite, EStreamEnd, -KData().Length());
+ strm1buf->WriteL(KData().Ptr(), KData().Length());
+
+ strm1buf->SeekL(MStreamBuf::EWrite, EStreamEnd, -4 * KStreamOffset);
+ strm1buf->WriteL(&KByte, 1);
+
+ strm1.CommitL();
+ CleanupStack::PopAndDestroy(&strm1);
+
+ //Read the record using a blob stream. MStreamBuf::SeekL() is used to read the content at a specific position.
+ RSqlBlobReadStream strm2;
+ CleanupClosePushL(strm2);
+ strm2.OpenL(TheDb1, _L("A"), _L("Fld2"));
+
+ TUint8 byte = 0;
+ MStreamBuf* strm2buf = strm2.Source();
+ TEST(strm1buf != NULL);
+
+ strm2buf->SeekL(MStreamBuf::ERead, EStreamBeginning, 0);
+ rc = strm2buf->ReadL(&byte, 1);
+ TEST2(rc, 1);
+ TEST2(byte, KByte);
+
+ strm2buf->SeekL(MStreamBuf::ERead, EStreamMark, KStreamOffset);
+ rc = strm2buf->ReadL(&byte, 1);
+ TEST2(rc, 1);
+ TEST2(byte, KByte);
+
+ strm2buf->SeekL(MStreamBuf::ERead, EStreamEnd, -KData().Length());
+ TUint8 buf[20];
+ rc = strm2buf->ReadL(buf, KData().Length());
+ TEST2(rc, KData().Length());
+ TPtrC8 bufptr(buf, rc);
+ TEST(bufptr == KData);
+
+ strm2buf->SeekL(MStreamBuf::ERead, EStreamEnd, -4 * KStreamOffset);
+ rc = strm2buf->ReadL(&byte, 1);
+ TEST2(rc, 1);
+ TEST2(byte, KByte);
+
+ CleanupStack::PopAndDestroy(&strm2);
+ }
+
void DoTestsL()
{
CreateTestDbs();
@@ -2015,6 +2101,9 @@
TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-SQL-UT-4114: Big blob test"));
BigBlobTestL();
+ TheTest.Next(_L(" @SYMTestCaseID:PDS-SQL-CT-4194: Blob streams. MStreamBuf::SeekL() test"));
+ StreamSeekTestL();
+
DeleteTestDbs();
}
--- a/persistentstorage/sql/TEST/t_sqlbur.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqlbur.cpp Thu May 27 14:29:47 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -130,8 +130,13 @@
//The SQL server would have the job to get a list of databases owned by
//the given SID and to determine whether the backup flag is set
//All databases that satisfy this requirement will be added to the array
-void CSqlBurTestHarness::GetBackUpListL(TSecureId /*aUid*/, RArray<TParse>& aFileList)
+void CSqlBurTestHarness::GetBackUpListL(TSecureId aUid, RArray<TParse>& aFileList)
{
+ if(aUid.iId == 0)
+ {//Simulates that there are no databases for backup
+ aFileList.Reset();
+ return;
+ }
//TheTest.Printf(_L("Getting backup file list for SID=%x\r\n"),aUid);
for(TInt i=0;i<KTestDbFileCnt;++i)
{
@@ -195,7 +200,7 @@
}
//Reads the content of the db files and stores the content to a global memory buffer.
-//That buffer content will be sued later for a verification of the restore process.
+//That buffer content will be used later for verification of the restore process.
void StoreDbContentToBuf(RFs& aFs)
{
for(TInt i=0;i<KTestDbFileCnt;++i)
@@ -822,7 +827,95 @@
(void)TheTestHarness->Fs().Delete(KBackupFile2);
}
-
+
+/**
+@SYMTestCaseID PDS-SQL-UT-4192
+@SYMTestCaseDesc SQL Backup&Restore - empty backup file list test.
+ The test checks what will happen if the list with the files for backup is empty.
+ The GetBackupDataSectionL() should immediatelly set the flag parameter to true and do nothing.
+@SYMTestActions SQL Backup&Restore - empty backup file list test.
+@SYMTestExpectedResults Test must not fail
+@SYMTestPriority High
+@SYMDEF DEF145198
+*/
+void EmptyBackupFileListTest()
+ {
+ TheTest.Next(_L(" @SYMTestCaseID:PDS-SQL-UT-4192 Backup&Restore: empty backup file list"));
+
+ CSqlBackupClient* backupClient = NULL;
+ TRAPD(err, backupClient = CSqlBackupClient::NewL(TheTestHarness));
+ TEST(backupClient != NULL);
+
+ TRAP(err, backupClient->InitialiseGetProxyBackupDataL(KNullUid, EDriveC));
+ TEST2(err, KErrNone);
+
+ TBuf8<100> buf;
+ TPtr8 ptr((TUint8*)buf.Ptr(), 0, buf.MaxLength());
+ TBool finishedFlag = EFalse;
+ TRAP(err, backupClient->GetBackupDataSectionL(ptr, finishedFlag));
+ delete backupClient;
+ TEST2(err, KErrNone);
+ TEST(finishedFlag);
+ TEST2(buf.Length(), 0);
+ }
+
+
+/**
+@SYMTestCaseID PDS-SQL-UT-4193
+@SYMTestCaseDesc SQL Backup&Restore - file I/O error simulation test.
+ The test executes a backup, followed by a restore operation
+ in a file I/O error simulation loop.
+@SYMTestActions SQL Backup&Restore - file I/O error simulation test.
+@SYMTestExpectedResults Test must not fail
+@SYMTestPriority High
+@SYMDEF DEF145198
+*/
+void BackupRestoreFileIoErrTest()
+ {
+ TheTest.Next(_L(" @SYMTestCaseID:PDS-SQL-UT-4193 Backup: File I/O error simulation test"));
+
+ //Make sure that the database content, just before the backup, will be copied to the test biffers.
+ //The buffers will be used during the restore testing for verification of the database content.
+ StoreDbContentToBuf(TheTestHarness->Fs());
+
+ for(TInt fsError=KErrNotFound;fsError>=KErrBadName;--fsError)
+ {
+ TheTest.Printf(_L("===Backup&Restore, simulated file system error=%d\r\n"), fsError);
+
+ TInt err = KErrGeneral;
+ TInt bytesStored = -1;
+ TInt it_cnt1 = 0;
+ for(;err<KErrNone;++it_cnt1)
+ {
+ __UHEAP_MARK;
+ (void)TheTestHarness->Fs().SetErrorCondition(fsError, it_cnt1);
+ TRAP(err, bytesStored = DoBackupL());
+ (void)TheTestHarness->Fs().SetErrorCondition(KErrNone);
+ __UHEAP_MARKEND;
+ }
+ TEST2(err, KErrNone);
+
+ err = KErrGeneral;
+ TInt bytesRestored = -1;
+ TInt it_cnt2 = 0;
+ for(;err<KErrNone;++it_cnt2)
+ {
+ __UHEAP_MARK;
+ (void)TheTestHarness->Fs().SetErrorCondition(fsError, it_cnt2);
+ TRAP(err, bytesRestored = DoRestoreL());
+ (void)TheTestHarness->Fs().SetErrorCondition(KErrNone);
+ __UHEAP_MARKEND;
+ }
+ TEST2(err, KErrNone);
+
+ TEST2(bytesStored, bytesRestored);
+ CompareDbContentWithBuf(TheTestHarness->Fs());
+
+ TheTest.Printf(_L("Backup&Restore file I/O error simulation test succeeded at backup iteration %d and restore itreration %d\r\n"), it_cnt1 - 1, it_cnt2 - 1);
+ }
+ }
+
+
void DoMain()
{
TestEnvCreate();
@@ -837,6 +930,10 @@
FunctionalTest2();
LegacyFileFormatTest();
+
+ EmptyBackupFileListTest();
+
+ BackupRestoreFileIoErrTest();
TestEnvDestroy();
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/sql/TEST/t_sqlcmdlineutil.cpp Thu May 27 14:29:47 2010 +0300
@@ -0,0 +1,192 @@
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+#include <e32test.h>
+#include "t_sqlcmdlineutil.h"
+
+static void GetCmdLine(RTest& aTest, const TDesC& aTestName, TDes& aCmdLine)
+ {
+ User::CommandLine(aCmdLine);
+ aCmdLine.TrimAll();
+ if(aCmdLine.Length() == 0)
+ {
+ aTest.Printf(_L("Usage: %S [ [/enc=<16/8>] /drv=<drive letter>:] [/page=<512/1024/2048/4096/8192/16384/32768>] ] [/cache=<number>]\r\n"), &aTestName);
+ return;
+ }
+ aCmdLine.Append(TChar('/'));
+ }
+
+static void ExtractCmdLineParams(TDes& aCmdLine, RArray<TPtrC>& aPrmNames, RArray<TPtrC>& aPrmValues)
+ {
+ aPrmNames.Reset();
+ aPrmValues.Reset();
+
+ enum TState{EWaitPrmStart, EReadPrmName, EReadPrmValue};
+ TState state = EWaitPrmStart;
+ TInt startPos = -1;
+ TPtr prmName(0, 0);
+ TPtr prmValue(0, 0);
+
+ aCmdLine.Append(TChar('/'));
+
+ for(TInt i=0;i<aCmdLine.Length();++i)
+ {
+ switch(state)
+ {
+ case EWaitPrmStart:
+ if(aCmdLine[i] == TChar('/'))
+ {
+ startPos = i + 1;
+ prmName.Zero();
+ state = EReadPrmName;
+ }
+ break;
+ case EReadPrmName:
+ if(aCmdLine[i] == TChar('='))
+ {
+ TPtr p = aCmdLine.MidTPtr(startPos, i - startPos);
+ prmName.Set(p);
+ prmName.TrimRight();
+ startPos = i + 1;
+ prmValue.Zero();
+ state = EReadPrmValue;
+ }
+ break;
+ case EReadPrmValue:
+ if(aCmdLine[i] == TChar('/'))
+ {
+ TPtr p = aCmdLine.MidTPtr(startPos, i - startPos);
+ prmValue.Set(p);
+ prmValue.Trim();
+ startPos = i + 1;
+ aPrmNames.Append(prmName);
+ aPrmValues.Append(prmValue);
+ prmName.Zero();
+ prmValue.Zero();
+ state = EReadPrmName;
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
+static void ExtractParamNamesAndValues(const RArray<TPtrC>& aPrmNames, const RArray<TPtrC>& aPrmValues, TCmdLineParams& aCmdLineParams)
+ {
+ __ASSERT_ALWAYS(aPrmNames.Count() == aPrmValues.Count(), User::Invariant());
+
+ aCmdLineParams.SetDefaults();
+
+ for(TInt i=0;i<aPrmNames.Count();++i)
+ {
+ if(aPrmNames[i].CompareF(_L("enc")) == 0)
+ {
+ TLex lex(aPrmValues[i]);
+ TInt enc = 0;
+ TInt err = lex.Val(enc);
+ if(err == KErrNone)
+ {
+ if(enc == 8)
+ {
+ aCmdLineParams.iDbEncoding = TCmdLineParams::EDbUtf8;
+ }
+ else if(enc == 16)
+ {
+ aCmdLineParams.iDbEncoding = TCmdLineParams::EDbUtf16;
+ }
+ }
+ }
+ else if(aPrmNames[i].CompareF(_L("drv")) == 0)
+ {
+ if(aPrmValues[i].Length() == 2 && aPrmValues[i][1] == TChar(':'))
+ {
+ TChar ch(aPrmValues[i][0]);
+ ch.LowerCase();
+ if(ch >= TChar('a') && ch <= TChar('z'))
+ aCmdLineParams.iDriveName.Copy(aPrmValues[i]);
+ }
+ }
+ else if(aPrmNames[i].CompareF(_L("page")) == 0)
+ {
+ TLex lex(aPrmValues[i]);
+ TInt pageSize = 0;
+ TInt err = lex.Val(pageSize);
+ if(err == KErrNone && (pageSize == 512 || pageSize == 1024 || pageSize == 2048 ||
+ pageSize == 4096 || pageSize == 8192 || pageSize == 16384 || pageSize == 32768))
+ {
+ aCmdLineParams.iPageSize = pageSize;
+ }
+ }
+ else if(aPrmNames[i].CompareF(_L("cache")) == 0)
+ {
+ TLex lex(aPrmValues[i]);
+ TInt cacheSize = 0;
+ TInt err = lex.Val(cacheSize);
+ if(err == KErrNone && (cacheSize > 0 && cacheSize < 1000000000))
+ {
+ aCmdLineParams.iCacheSize = cacheSize;
+ }
+ }
+ }
+ }
+
+static void PrepareSqlConfigString(RTest& aTest, const TCmdLineParams& aCmdLineParams, TDes8& aConfigStr)
+ {
+ aConfigStr.Zero();
+
+ if(aCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf8)
+ {
+ aTest.Printf(_L("--PRM--Database Encoding: UTF8\r\n"));
+ aConfigStr.Append(_L8("encoding=\"UTF-8\";"));
+ }
+ else
+ {
+ aTest.Printf(_L("--PRM--Database Encoding: UTF16\r\n"));
+ aConfigStr.Append(_L8("encoding=\"UTF-16\";"));
+ }
+
+ aTest.Printf(_L("--PRM--Database page size: %d\r\n"), aCmdLineParams.iPageSize);
+ TBuf8<20> pageSizeBuf;
+ pageSizeBuf.Format(_L8("page_size=%d;"), aCmdLineParams.iPageSize);
+ aConfigStr.Append(pageSizeBuf);
+
+ aTest.Printf(_L("--PRM--Database cache size: %d\r\n"), aCmdLineParams.iCacheSize);
+ TBuf8<20> cacheSizeBuf;
+ cacheSizeBuf.Format(_L8("cache_size=%d;"), aCmdLineParams.iCacheSize);
+ aConfigStr.Append(cacheSizeBuf);
+
+ aTest.Printf(_L("--PRM--Database drive: %S\r\n"), &aCmdLineParams.iDriveName);
+ }
+
+void GetCmdLineParamsAndSqlConfigString(RTest& aTest, const TDesC& aTestName, TCmdLineParams& aCmdLineParams, TDes8& aConfigStr)
+ {
+ TBuf<200> cmdLine;
+ GetCmdLine(aTest, aTestName, cmdLine);
+ RArray<TPtrC> prmNames;
+ RArray<TPtrC> prmValues;
+ ExtractCmdLineParams(cmdLine, prmNames, prmValues);
+ ExtractParamNamesAndValues(prmNames, prmValues, aCmdLineParams);
+ prmValues.Close();
+ prmNames.Close();
+ PrepareSqlConfigString(aTest, aCmdLineParams, aConfigStr);
+ }
+
+void PrepareDbName(const TDesC& aDeafultDbName, const TDriveName& aDriveName, TDes& aDbName)
+ {
+ TParse parse;
+ parse.Set(aDriveName, &aDeafultDbName, 0);
+ const TDesC& dbFilePath = parse.FullName();
+ aDbName.Copy(dbFilePath);
+ }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/sql/TEST/t_sqlcmdlineutil.h Thu May 27 14:29:47 2010 +0300
@@ -0,0 +1,62 @@
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#ifndef T_SQLCMDLINEUTIL_H
+#define T_SQLCMDLINEUTIL_H
+
+#include <f32file.h>
+
+class RTest;
+
+struct TCmdLineParams
+ {
+ enum TDbEncoding
+ {
+ EDbUtf8,
+ EDbUtf16
+ };
+
+ inline TCmdLineParams(TDbEncoding aDefaultEncoding = EDbUtf16,
+ TInt aDefaultPageSize = 1024,
+ TInt aDefaultCacheSize = 1000) :
+ iDefaultEncoding(aDefaultEncoding),
+ iDefaultPageSize(aDefaultPageSize),
+ iDefaultCacheSize(aDefaultCacheSize)
+ {
+ SetDefaults();
+ }
+
+ inline void SetDefaults()
+ {
+ iDbEncoding = iDefaultEncoding;
+ iPageSize = iDefaultPageSize;
+ iCacheSize = iDefaultCacheSize;
+ iDriveName.Copy(_L("c:"));
+ }
+
+ const TDbEncoding iDefaultEncoding;
+ const TInt iDefaultPageSize;
+ const TInt iDefaultCacheSize;
+
+ TDbEncoding iDbEncoding;
+ TInt iPageSize;
+ TInt iCacheSize;
+ TDriveName iDriveName;
+ };
+
+void GetCmdLineParamsAndSqlConfigString(RTest& aTest, const TDesC& aTestName, TCmdLineParams& aCmdLineParams, TDes8& aConfigStr);
+void PrepareDbName(const TDesC& aDeafultDbName, const TDriveName& aDriveName, TDes& aDbName);
+
+#endif//T_SQLCMDLINEUTIL_H
--- a/persistentstorage/sql/TEST/t_sqlcompact2.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqlcompact2.cpp Thu May 27 14:29:47 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -835,7 +835,7 @@
break;
}
- (void)TheFs.SetErrorCondition(err, ++ioCounter);
+ (void)TheFs.SetErrorCondition(err, ioCounter++);
CSqlCompactEntry* impl = compactor->iEntries[0];
impl->iPageCount = freePageCount2;
--- a/persistentstorage/sql/TEST/t_sqlconfigfile.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqlconfigfile.cpp Thu May 27 14:29:47 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -730,7 +730,7 @@
TheDb.Close();
err = -1;
const TInt KTestRecCnt = 100;
- for(TInt cnt=1;err<KErrNone;++cnt)
+ for(TInt cnt=0;err<KErrNone;++cnt)
{
TheTest.Printf(_L("%d \r"), cnt);
err = TheDb.Open(KTestDbName);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/sql/TEST/t_sqlcorrupt.cpp Thu May 27 14:29:47 2010 +0300
@@ -0,0 +1,255 @@
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+#include <e32test.h>
+#include <bautils.h>
+#include <sqldb.h>
+
+///////////////////////////////////////////////////////////////////////////////////////
+
+RSqlDatabase TheDb;
+RTest TheTest(_L("t_sqlcorrupt test"));
+
+_LIT(KTestDir, "c:\\test\\");
+
+_LIT(KDbName, "c:[08770000]t_sqlcorrupt.db");
+_LIT(KFullDbName, "c:\\private\\10281E17\\[08770000]t_sqlcorrupt.db");
+
+_LIT(KDbName2, "c:[08770000]t_sqlcorrupt2.db");
+_LIT(KFullDbName2, "c:\\private\\10281E17\\[08770000]t_sqlcorrupt2.db");
+
+RFs TheFs;
+
+///////////////////////////////////////////////////////////////////////////////////////
+
+void DestroyTestEnv()
+ {
+ TheDb.Close();
+ (void)RSqlDatabase::Delete(KDbName2);
+ (void)RSqlDatabase::Delete(KDbName);
+ TheFs.Close();
+ }
+
+///////////////////////////////////////////////////////////////////////////////////////
+//Test macros and functions
+void Check1(TInt aValue, TInt aLine)
+ {
+ if(!aValue)
+ {
+ DestroyTestEnv();
+ RDebug::Print(_L("*** Boolean expression evaluated to false. Line %d\r\n"), aLine);
+ TheTest(EFalse, aLine);
+ }
+ }
+void Check2(TInt aValue, TInt aExpected, TInt aLine)
+ {
+ if(aValue != aExpected)
+ {
+ DestroyTestEnv();
+ RDebug::Print(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
+ TheTest(EFalse, aLine);
+ }
+ }
+#define TEST(arg) ::Check1((arg), __LINE__)
+#define TEST2(aValue, aExpected) ::Check2(aValue, aExpected, __LINE__)
+
+///////////////////////////////////////////////////////////////////////////////////////
+
+enum TDbEncoding
+ {
+ EDbEncUtf16,
+ EDbEncUtf8,
+ };
+
+void DoCorruptedSecureDbTest(TDbEncoding aEncoding)
+ {
+ (void)RSqlDatabase::Delete(KDbName);
+
+ RSqlSecurityPolicy policy;
+ TInt err = policy.Create(TSecurityPolicy::EAlwaysPass);
+ TEST2(err, KErrNone);
+
+ err = policy.SetDbPolicy(RSqlSecurityPolicy::ESchemaPolicy, TSecurityPolicy::EAlwaysPass);
+ TEST2(err, KErrNone);
+ err = policy.SetDbPolicy(RSqlSecurityPolicy::EWritePolicy, TSecurityPolicy::EAlwaysPass);
+ TEST2(err, KErrNone);
+ err = policy.SetDbPolicy(RSqlSecurityPolicy::EReadPolicy, TSecurityPolicy::EAlwaysPass);
+ TEST2(err, KErrNone);
+
+ err = policy.SetPolicy(RSqlSecurityPolicy::ETable, _L("A"), RSqlSecurityPolicy::EWritePolicy, TSecurityPolicy::EAlwaysPass);
+ TEST2(err, KErrNone);
+ err = policy.SetPolicy(RSqlSecurityPolicy::ETable, _L("A"), RSqlSecurityPolicy::EReadPolicy, TSecurityPolicy::EAlwaysPass);
+ TEST2(err, KErrNone);
+
+ if(aEncoding == EDbEncUtf16)
+ {
+ err = TheDb.Create(KDbName, policy);
+ }
+ else
+ {
+ _LIT8(KConfig, "encoding = \"UTF-8\"");
+ err = TheDb.Create(KDbName, policy, &KConfig);
+ }
+ TEST2(err, KErrNone);
+ err = TheDb.Exec(_L("CREATE TABLE A(I INTEGER); INSERT INTO A VALUES(10)"));
+ TEST(err >= 0);
+ TheDb.Close();
+ policy.Close();
+
+ CFileMan* fm = NULL;
+ TRAP(err, fm = CFileMan::NewL(TheFs));
+ TEST2(err, KErrNone);
+
+ //Make a copy of the database
+ err = fm->Copy(KFullDbName, KFullDbName2);
+ TEST2(err, KErrNone);
+ //Get the database file size and calculate the iterations count.
+ TEntry entry;
+ err = TheFs.Entry(KFullDbName, entry);
+ TEST2(err, KErrNone);
+ const TInt KCorruptBlockLen = 19;
+ const TInt KIterationCnt = entry.iSize / KCorruptBlockLen;
+ //
+ TBuf8<KCorruptBlockLen> invalidData;
+ invalidData.SetLength(KCorruptBlockLen);
+ invalidData.Fill(TChar(0xCC));
+ //
+ for(TInt i=0;i<KIterationCnt;++i)
+ {
+ TheTest.Printf(_L("% 4d\r"), i + 1);
+ //Corrupt the database
+ err = fm->Copy(KFullDbName2, KFullDbName);
+ TEST2(err, KErrNone);
+ RFile file;
+ err = file.Open(TheFs, KFullDbName, EFileRead | EFileWrite);
+ TEST2(err, KErrNone);
+ err = file.Write(i * KCorruptBlockLen, invalidData);
+ TEST2(err, KErrNone);
+ file.Close();
+ //Try to open the database and read the record
+ TBool testPassed = EFalse;
+ err = TheDb.Open(KDbName);
+ if(err == KErrNone)
+ {
+ RSqlStatement stmt;
+ err = stmt.Prepare(TheDb, _L("SELECT I FROM A"));
+ if(err == KErrNone)
+ {
+ err = stmt.Next();
+ if(err == KSqlAtRow)
+ {
+ TInt val = stmt.ColumnInt(0);
+ if(val == 10)
+ {
+ testPassed = ETrue;
+ err = KErrNone;
+ }
+ else
+ {
+ err = KErrGeneral;
+ }
+ }
+ stmt.Close();
+ }
+ }
+
+ TheDb.Close();
+ (void)RSqlDatabase::Delete(KDbName);
+ TheTest.Printf(_L("Iteration % 4d, err=%d\r\n"), i + 1, err);
+ if(!testPassed)
+ {
+ TEST(err != KErrNone);
+ }
+ }//end of - for(TInt i=0;i<KIterationCnt;++i)
+
+ delete fm;
+ TheTest.Printf(_L("\r\n"));
+ }
+
+/**
+@SYMTestCaseID PDS-SQL-CT-4202
+@SYMTestCaseDesc Invalid UTF16 encoded secure database test.
+@SYMTestPriority High
+@SYMTestActions The test creates 16-bit encoded secure database with one table and one record.
+ Then the test simulates a database corruption by writing 19 bytes with random values
+ from "pos" to "pos + 19", where "pos" is a valid db file position, incremented by 19
+ at the end of each test iteration.
+@SYMTestExpectedResults Test must not fail
+*/
+void CorruptedSecureDbTest16()
+ {
+ DoCorruptedSecureDbTest(EDbEncUtf16);
+ }
+
+/**
+@SYMTestCaseID PDS-SQL-CT-4202
+@SYMTestCaseDesc Invalid UTF8 encoded secure database test.
+@SYMTestPriority High
+@SYMTestActions The test creates 8-bit encoded secure database with one table and one record.
+ Then the test simulates a database corruption by writing 19 bytes with random values
+ from "pos" to "pos + 19", where "pos" is a valid db file position, incremented by 19
+ at the end of each test iteration.
+@SYMTestExpectedResults Test must not fail
+*/
+void CorruptedSecureDbTest8()
+ {
+ DoCorruptedSecureDbTest(EDbEncUtf8);
+ }
+
+void CreateTestEnv()
+ {
+ TInt err = TheFs.Connect();
+ TEST2(err, KErrNone);
+
+ err = TheFs.MkDir(KTestDir);
+ TEST(err == KErrNone || err == KErrAlreadyExists);
+
+ err = TheFs.CreatePrivatePath(EDriveC);
+ TEST(err == KErrNone || err == KErrAlreadyExists);
+ }
+
+void DoTestsL()
+ {
+ TheTest.Start(_L("@SYMTestCaseID:PDS-SQL-CT-4202 Corrupted UTF16 encoded secure database test"));
+ CorruptedSecureDbTest16();
+
+ TheTest.Next(_L("@SYMTestCaseID:PDS-SQL-CT-4203 Corrupted UTF8 encoded secure database test"));
+ CorruptedSecureDbTest8();
+ }
+
+TInt E32Main()
+ {
+ TheTest.Title();
+
+ CTrapCleanup* tc = CTrapCleanup::New();
+ TheTest(tc != NULL);
+
+ __UHEAP_MARK;
+
+ CreateTestEnv();
+ TRAPD(err, DoTestsL());
+ DestroyTestEnv();
+ TEST2(err, KErrNone);
+
+ __UHEAP_MARKEND;
+
+ TheTest.End();
+ TheTest.Close();
+
+ delete tc;
+
+ User::Heap().Check();
+ return KErrNone;
+ }
--- a/persistentstorage/sql/TEST/t_sqldbconfigfile.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqldbconfigfile.cpp Thu May 27 14:29:47 2010 +0300
@@ -1001,7 +1001,7 @@
err = KErrNotFound;
TInt iter = 0;
TheTest.Printf(_L("Iteration\r\n"));
- for(TInt cnt = 1; !isFinished; ++cnt)
+ for(TInt cnt = 0; !isFinished; ++cnt)
{
for(TInt fsError = KErrNotFound; fsError >= KErrUnderflow; --fsError) // errors -1 to -10 will be generated
{
--- a/persistentstorage/sql/TEST/t_sqldefect.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqldefect.cpp Thu May 27 14:29:47 2010 +0300
@@ -1394,7 +1394,7 @@
// Begin test
TInt fsError = KErrGeneral;
- TInt count = 1;
+ TInt count = 0;
const TInt KMaxOps = 300;
@@ -1634,7 +1634,8 @@
}
/**
-Test defect where calling RSQLStatement::DeclaredColumnType() on a table which contains long (> 20 characters) column type names results in a USER 11 panic.
+Test defect where calling RSQLStatement::DeclaredColumnType() on a table which contains long (> 20 characters) column type
+names results in a USER 11 panic.
This test should pass because these are valid SQL column types
*/
void LongColumnTypeTest()
--- a/persistentstorage/sql/TEST/t_sqlenvcreate.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqlenvcreate.cpp Thu May 27 14:29:47 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -12,7 +12,7 @@
//
// Description:
// SQL security - copying secure test databases to C:
-// Please, ensure that t_sqlenvcreate test is executed before the other sql security tests
+// Please, ensure that t_sqlenvcreate test is executed before the other sql tests
//
//
@@ -59,9 +59,19 @@
_LIT(KDb8org, "z:\\private\\10281e17\\[98765432]t_2defaultpolicies.db");
_LIT(KDb8, "c:\\private\\10281e17\\[98765432]t_2defaultpolicies.db");
+_LIT(KPrivateSubDir, "c:\\private\\10281e17\\cfg-TestDir.db\\");
+
///////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////
//Test macros and functions
+static void Check(TInt aValue, TInt aLine)
+ {
+ if(!aValue)
+ {
+ RDebug::Print(_L("*** Line %d\r\n"), aLine);
+ TheTest(EFalse, aLine);
+ }
+ }
static void Check(TInt aValue, TInt aExpected, TInt aLine)
{
if(aValue != aExpected)
@@ -70,6 +80,7 @@
TheTest(EFalse, aLine);
}
}
+#define TEST(arg) ::Check((arg), __LINE__)
#define TEST2(aValue, aExpected) ::Check(aValue, aExpected, __LINE__)
///////////////////////////////////////////////////////////////////////////////////////
@@ -82,6 +93,11 @@
TheTest.Start(_L(" @SYMTestCaseID:SYSLIB-SQL-LEGACY-T_SQLENVCREATE-0001 Copy secure databases from Z: to C: "));
+ //Create a subdir in the private datacage. The SQL production code should properly detects
+ //KPrivateSubDir is a directory not a database file
+ err = fs.MkDir(KPrivateSubDir);
+ TEST(err == KErrNone || err == KErrAlreadyExists);
+
err = BaflUtils::CopyFile(fs, KDbZFileName1, KDbCFileName1);
TEST2(err, KErrNone);
err = fs.SetAtt(KDbCFileName1, 0, KEntryAttReadOnly);
--- a/persistentstorage/sql/TEST/t_sqlenvdestroy.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqlenvdestroy.cpp Thu May 27 14:29:47 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -36,6 +36,8 @@
_LIT(KDb7, "c:\\private\\10281e17\\[98765432]t_invobject.db");
_LIT(KDb8, "c:\\private\\10281e17\\[98765432]t_2defaultpolicies.db");
+_LIT(KPrivateSubDir, "c:\\private\\10281e17\\cfg-TestDir.db\\");
+
///////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////
//Test macros and functions
@@ -83,6 +85,14 @@
DoDeleteFile(fs, KDb7);
DoDeleteFile(fs, KDb8);
+ //Create a subdir in the private datacage. The SQL production code should properly detects
+ //KPrivateSubDir is a directory not a database file
+ err = fs.RmDir(KPrivateSubDir);
+ if(err != KErrNone && err != KErrNotFound)
+ {
+ TheTest.Printf(_L("Error %d deleting \"%S\" directory.\n"), err, &KPrivateSubDir);
+ }
+
fs.Close();
}
--- a/persistentstorage/sql/TEST/t_sqlfilebuf64.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqlfilebuf64.cpp Thu May 27 14:29:47 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -30,6 +30,7 @@
_LIT(KTestDir, "c:\\test\\");
_LIT(KTestFile, "c:\\test\\t_sqlfilebuf64.bin");
_LIT(KTestFile2, "\\test\\t_sqlfilebuf64_2.bin");
+_LIT(KTestFile3, "c:\\test\\t_sqlfilebuf64_3.bin");
static TBuf8<1024> TheBuf;
static TFileName TheDbName;
@@ -57,6 +58,7 @@
{
(void)TheFs.Delete(TheDbName);
}
+ (void)TheFs.Delete(KTestFile3);
(void)TheFs.Delete(KTestFile);
}
@@ -508,20 +510,18 @@
const TInt KBufMaxSize = 20;// This is half the file size
RFileBuf64 fbuf(KBufMaxSize);
TInt err = fbuf.Open(TheFs, KTestFile, EFileWrite | EFileRead | EFileShareReadersOrWriters);
- TEST2(err, KErrNone);
+ TEST2(err, KErrNone);
fbuf.ProfilerReset();
//Zero max length request
- HBufC8* buf1 = HBufC8::New(0);
- TEST(buf1 != NULL);
- TPtr8 ptr1 = buf1->Des();
+ TUint8 buf1[1];
+ TPtr8 ptr1(buf1, 0);
err = fbuf.Read(0, ptr1);
TEST2(err, KErrNone);
- delete buf1;
TEST2(fbuf.iFileReadCount, 0);
TEST2(fbuf.iFileReadAmount, 0);
TEST2(fbuf.iFileSizeCount, 0);
-
+
//Too big request
TBuf8<KBufMaxSize * 2> buf2;
err = fbuf.Read(0, buf2);
@@ -536,6 +536,30 @@
TEST2(err, KErrNone);
TEST2(buf2.Length(), 0);
+ //Write "5678" in the buffer, pos [4..8)
+ err = fbuf.Write(4, _L8("5678"));
+ TEST2(err, KErrNone);
+
+ //Too big request. There are pending data in the buffer.
+ TBuf8<KBufMaxSize + 2> buf3;
+ err = fbuf.Read(1, buf3);
+ TEST2(err, KErrNone);
+ VerifyFileContent(buf3, 1);
+
+ //Read from a non-zero file position to move the buffer start pos. The cached file pos will be 35 at the end.
+ TBuf8<5> buf4;
+ err = fbuf.Read(30, buf4);
+ TEST2(err, KErrNone);
+ VerifyFileContent(buf4, 30);
+ err = fbuf.Read(35, buf4);
+ TEST2(err, KErrNone);
+ VerifyFileContent(buf4, 35);
+
+ //Too big request. No pending data in the buffer. The file read pos is before the position of the cached data in the buffer.
+ err = fbuf.Read(10, buf3);
+ TEST2(err, KErrNone);
+ VerifyFileContent(buf3, 10);
+
fbuf.Close();
}
@@ -981,6 +1005,113 @@
(void)TheFs.Delete(KTestFile);
}
+/**
+@SYMTestCaseID PDS-SQL-UT-4195
+@SYMTestCaseDesc RFileBuf64::Create() file I/O error simulation test.
+ The test calls RFileBuf64:Create() in a file I/O error simulation loop.
+@SYMTestActions RFileBuf64::Create() file I/O error simulation test.
+@SYMTestExpectedResults Test must not fail
+@SYMTestPriority High
+@SYMDEF DEF145198
+*/
+void CreateFileIoErrTest()
+ {
+ TInt err = KErrGeneral;
+ TInt cnt = 0;
+ for(;err<KErrNone;++cnt)
+ {
+ TheTest.Printf(_L("===Iteration %d. Simulated error:\r\n"), cnt);
+ for (TInt fsError=KErrNotFound;fsError>=KErrBadName;--fsError)
+ {
+ TheTest.Printf(_L("%d "), fsError);
+ __UHEAP_MARK;
+ (void)TheFs.SetErrorCondition(fsError, cnt);
+ RFileBuf64 fbuf(1024);//buffer capacity = 1024 bytes
+ err = fbuf.Create(TheFs, KTestFile3, EFileRead | EFileWrite);
+ (void)TheFs.SetErrorCondition(KErrNone);
+ fbuf.Close();
+ __UHEAP_MARKEND;
+ TInt err2 = TheFs.Delete(KTestFile3);
+ TInt expectedErr = err == KErrNone ? KErrNone : KErrNotFound;
+ TEST2(err2, expectedErr);
+ }
+ TheTest.Printf(_L("\r\n"));
+ }
+ TheTest.Printf(_L("\r\n===File I/O error simulation test succeeded on iteration %d===\r\n"), cnt);
+ }
+
+/**
+@SYMTestCaseID PDS-SQL-UT-4196
+@SYMTestCaseDesc RFileBuf64::Open() file I/O error simulation test.
+ The test calls RFileBuf64:Open() in a file I/O error simulation loop.
+@SYMTestActions RFileBuf64::Open() file I/O error simulation test.
+@SYMTestExpectedResults Test must not fail
+@SYMTestPriority High
+@SYMDEF DEF145198
+*/
+void OpenFileIoErrTest()
+ {
+ RFileBuf64 fbuf(1024);//buffer capacity = 1024 bytes
+ TInt err = fbuf.Create(TheFs, KTestFile3, EFileRead | EFileWrite);
+ fbuf.Close();
+ TEST2(err, KErrNone);
+ err = KErrGeneral;
+ TInt cnt = 0;
+ for(;err<KErrNone;++cnt)
+ {
+ TheTest.Printf(_L("===Iteration %d. Simulated error:\r\n"), cnt);
+ for (TInt fsError=KErrNotFound;fsError>=KErrBadName;--fsError)
+ {
+ TheTest.Printf(_L("%d "), fsError);
+ __UHEAP_MARK;
+ (void)TheFs.SetErrorCondition(fsError, cnt);
+ err = fbuf.Open(TheFs, KTestFile3, EFileRead | EFileWrite);
+ (void)TheFs.SetErrorCondition(KErrNone);
+ fbuf.Close();
+ __UHEAP_MARKEND;
+ }
+ TheTest.Printf(_L("\r\n"));
+ }
+ TheTest.Printf(_L("\r\n===File I/O error simulation test succeeded on iteration %d===\r\n"), cnt);
+ (void)TheFs.Delete(KTestFile3);
+ }
+
+/**
+@SYMTestCaseID PDS-SQL-UT-4197
+@SYMTestCaseDesc RFileBuf64::Temp() file I/O error simulation test.
+ The test calls RFileBuf64:Temp() in a file I/O error simulation loop.
+@SYMTestActions RFileBuf64::temp() file I/O error simulation test.
+@SYMTestExpectedResults Test must not fail
+@SYMTestPriority High
+@SYMDEF DEF145198
+*/
+void TempFileIoErrTest()
+ {
+ TInt err = KErrGeneral;
+ TInt cnt = 0;
+ for(;err<KErrNone;++cnt)
+ {
+ TheTest.Printf(_L("===Iteration %d. Simulated error:\r\n"), cnt);
+ for (TInt fsError=KErrNotFound;fsError>=KErrBadName;--fsError)
+ {
+ TheTest.Printf(_L("%d "), fsError);
+ __UHEAP_MARK;
+ (void)TheFs.SetErrorCondition(fsError, cnt);
+ RFileBuf64 fbuf(1024);//buffer capacity = 1024 bytes
+ TFileName tmpFileName;
+ err = fbuf.Temp(TheFs, KTestDir, tmpFileName, EFileWrite | EFileRead);
+ (void)TheFs.SetErrorCondition(KErrNone);
+ fbuf.Close();
+ __UHEAP_MARKEND;
+ TInt err2 = TheFs.Delete(tmpFileName);
+ TInt expectedErr = err == KErrNone ? KErrNone : KErrNotFound;
+ TEST2(err2, expectedErr);
+ }
+ TheTest.Printf(_L("\r\n"));
+ }
+ TheTest.Printf(_L("\r\n===File I/O error simulation test succeeded on iteration %d===\r\n"), cnt);
+ }
+
void DoTests()
{
TheTest.Start(_L(" @SYMTestCaseID:PDS-SQL-UT-4132 RFileBuf64 write test 1"));
@@ -1015,6 +1146,13 @@
OomTest(EOomOpenTest);
TheTest.Next( _L(" @SYMTestCaseID:PDS-SQL-UT-4142 RFileBuf64::Temp() OOM test"));
OomTest(EOomTempTest);
+
+ TheTest.Next( _L(" @SYMTestCaseID:PDS-SQL-UT-4195 RFileBuf64::Create() file I/O error simulation test"));
+ CreateFileIoErrTest();
+ TheTest.Next( _L(" @SYMTestCaseID:PDS-SQL-UT-4196 RFileBuf64::Open() file I/O error simulation test"));
+ OpenFileIoErrTest();
+ TheTest.Next( _L(" @SYMTestCaseID:PDS-SQL-UT-4197 RFileBuf64::Temp() file I/O error simulation test"));
+ OpenFileIoErrTest();
}
TInt E32Main()
--- a/persistentstorage/sql/TEST/t_sqlfserr.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqlfserr.cpp Thu May 27 14:29:47 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -165,7 +165,7 @@
TEST(err >= 0);
TheDb.Close();
err = KErrNotFound;
- for(TInt cnt=1;err<KErrNone;++cnt)
+ for(TInt cnt=0;err<KErrNone;++cnt)
{
TheTest.Printf(_L("%d \r"), cnt);
for (TInt fsError=KErrNotFound;fsError>=KErrDied;--fsError)
@@ -225,7 +225,7 @@
TEST(err >= 0);
TheDb.Close();
err = KErrNotFound;
- for(TInt cnt=1;err<KErrNone;++cnt)
+ for(TInt cnt=0;err<KErrNone;++cnt)
{
TheTest.Printf(_L("%d \r"), cnt);
for (TInt fsError=KErrNotFound;fsError>=KErrDied;--fsError)
@@ -284,6 +284,35 @@
TEST2(err, KErrNone);
}
+//Creates public shared, private secure and public secure databases.
+void DoCreateTestDatabases(const TPtrC aDbName[], TInt aCount)
+ {
+ TEST(aCount > 0);
+ for(TInt i=0;i<aCount;++i)
+ {
+ TheTest.Printf(_L("Database: \"%S\"\r\n"), &aDbName[i]);
+ (void)RSqlDatabase::Delete(aDbName[i]);
+ TInt err = KErrGeneral;
+ if(i == (aCount - 1))
+ {
+ RSqlSecurityPolicy policy;
+ CreateTestSecurityPolicy(policy);
+ err = TheDb.Create(aDbName[i], policy);
+ policy.Close();
+ }
+ else
+ {
+ err = TheDb.Create(aDbName[i]);
+ }
+ TEST2(err, KErrNone);
+ err = TheDb.Exec(_L("CREATE TABLE A(Id INTEGER,Name TEXT)"));
+ TEST(err >= 0);
+ err = TheDb.Exec(_L("INSERT INTO A(Id,Name) VALUES(1,'Name')"));
+ TEST2(err, 1);
+ TheDb.Close();
+ }
+ }
+
/**
@SYMTestCaseID SYSLIB-SQL-UT-3421
@SYMTestCaseDesc Test for DEF103859 "SQLITE panic, _DEBUG mode, persistent file I/O error simulation".
@@ -300,31 +329,12 @@
{
TPtrC dbName[] = {KTestDbName(), KPrivateTestDbName(), KSecureTestDbName()};
const TInt KDbNameCnt = sizeof(dbName) / sizeof(dbName[0]);
+ DoCreateTestDatabases(dbName, KDbNameCnt);
for(TInt k=0;k<KDbNameCnt;++k)
{
TheTest.Printf(_L("Database: \"%S\"\r\n"), &dbName[k]);
- (void)RSqlDatabase::Delete(dbName[k]);
- TInt err = KErrGeneral;
- if(k == (KDbNameCnt - 1))
- {
- RSqlSecurityPolicy policy;
- CreateTestSecurityPolicy(policy);
- err = TheDb.Create(dbName[k], policy);
- policy.Close();
- }
- else
- {
- err = TheDb.Create(dbName[k]);
- }
- TEST2(err, KErrNone);
- err = TheDb.Exec(_L("CREATE TABLE A(Id INTEGER,Name TEXT)"));
- TEST(err >= 0);
- err = TheDb.Exec(_L("INSERT INTO A(Id,Name) VALUES(1,'Name')"));
- TEST2(err, 1);
- TheDb.Close();
-
- err = KErrNotFound;
- for(TInt cnt=1;err<KErrNone;++cnt)
+ TInt err = KErrNotFound;
+ for(TInt cnt=0;err<KErrNone;++cnt)
{
TheTest.Printf(_L("%d \r"), cnt);
for (TInt fsError=KErrNotFound;fsError>=KErrDied;--fsError)
@@ -354,7 +364,7 @@
err = RSqlDatabase::Delete(dbName[k]);
TEST2(err, KErrNone);
TheTest.Printf(_L("\r\n"));
- }
+ }//end of: for(TInt k=0;k<KDbNameCnt;++k)
}
/**
@@ -380,7 +390,7 @@
{
TheTest.Printf(_L("Database: \"%S\"\r\n"), &dbName[k]);
TInt err = -1;
- for(TInt cnt=1;err<KErrNone;++cnt)
+ for(TInt cnt=0;err<KErrNone;++cnt)
{
TheTest.Printf(_L("%d \r"), cnt);
for (TInt fsError=KErrNotFound;fsError>=KErrDied;--fsError)
@@ -413,6 +423,78 @@
}
/**
+@SYMTestCaseID PDS-SQL-UT-4189
+@SYMTestCaseDesc Test for DEF145125 "SQL, low code coverage".
+ The test creates public shared, private secure and public secure test databases.
+ Then the test opens the publich shared database and attempts to attach one of the other two
+ in a file I/O error simulation loop.
+@SYMTestPriority High
+@SYMTestActions Test for DEF145125 - "SQL, low code coverage".
+@SYMTestExpectedResults The test must not fail
+@SYMDEF DEF145125
+*/
+void AttachDatabaseTest()
+ {
+ TPtrC dbName[] = {KTestDbName(), KPrivateTestDbName(), KSecureTestDbName()};
+ const TInt KDbNameCnt = sizeof(dbName) / sizeof(dbName[0]);
+ DoCreateTestDatabases(dbName, KDbNameCnt);
+ for(TInt k=1;k<KDbNameCnt;++k)
+ {
+ TheTest.Printf(_L("Database: \"%S\"\r\n"), &dbName[k]);
+ TInt err = KErrGeneral;
+ for(TInt cnt=0;err<KErrNone;++cnt)
+ {
+ TheTest.Printf(_L("%d \r"), cnt);
+ for(TInt fsError=KErrNotFound;fsError>=KErrDied;--fsError)
+ {
+ err = TheDb.Open(KTestDbName);
+ TEST2(err, KErrNone);
+ (void)TheFs.SetErrorCondition(fsError, cnt);
+ err = TheDb.Attach(dbName[k], _L("DB2"));
+ (void)TheFs.SetErrorCondition(KErrNone);
+ (void)TheDb.Detach(_L("DB2"));
+ TheDb.Close();//close the database to recover from the last error
+ }
+ }
+ TEST2(err, KErrNone);
+ err = RSqlDatabase::Delete(dbName[k]);
+ TEST2(err, KErrNone);
+ TheTest.Printf(_L("\r\n"));
+ }
+ }
+
+/**
+@SYMTestCaseID PDS-SQL-UT-4190
+@SYMTestCaseDesc Test for DEF145125 "SQL, low code coverage".
+ The tests attempts to delete a database in a file I/O error simulation loop.
+@SYMTestPriority High
+@SYMTestActions Test for DEF145125 - "SQL, low code coverage".
+@SYMTestExpectedResults The test must not fail
+@SYMDEF DEF145125
+*/
+void DeleteDatabaseTest()
+ {
+ TPtrC dbName[] = {KTestDbName(), KPrivateTestDbName(), KSecureTestDbName()};
+ const TInt KDbNameCnt = sizeof(dbName) / sizeof(dbName[0]);
+ DoCreateTestDatabases(dbName, KDbNameCnt);
+ for(TInt k=0;k<KDbNameCnt;++k)
+ {
+ TheTest.Printf(_L("Database: \"%S\"\r\n"), &dbName[k]);
+ TInt err = KErrGeneral;
+ for(TInt cnt=1;err<KErrNone;++cnt)
+ {
+ TheTest.Printf(_L("%d \r"), cnt);
+ (void)TheFs.SetErrorCondition(KErrGeneral, cnt);
+ err = RSqlDatabase::Delete(dbName[k]);
+ (void)TheFs.SetErrorCondition(KErrNone);
+ }
+ TEST2(err, KErrNone);
+ err = RSqlDatabase::Delete(KTestDbName);
+ TEST2(err, KErrNotFound);
+ }
+ }
+
+/**
@SYMTestCaseID SYSLIB-SQL-UT-3462
@SYMTestCaseDesc Test for DEF105434 "SQL, persistent file I/O simulation, COMMIT problem".
The test creates a test database with one table, inserts one record.
@@ -434,7 +516,7 @@
TEST2(err, 1);
TheDb.Close();
err = -1;
- for(TInt cnt=1;err<KErrNone;++cnt)
+ for(TInt cnt=0;err<KErrNone;++cnt)
{
TheTest.Printf(_L("%d \r"), cnt);
err = TheDb.Open(KTestDbName);
@@ -499,7 +581,7 @@
TEST2(err, 1);
TheDb.Close();
err = -1;
- for(TInt cnt=1;err<KErrNone;++cnt)
+ for(TInt cnt=0;err<KErrNone;++cnt)
{
TheTest.Printf(_L("%d \r"), cnt);
err = TheDb.Open(KTestDbName);
@@ -717,7 +799,7 @@
TInt rc = -1;
TBuf8<KMaxFileName + 1> dbFileName8;
dbFileName8.Copy(TheRmvMediaDbFileName);
- for(TInt cnt=1;rc!=SQLITE_OK;++cnt)
+ for(TInt cnt=0;rc!=SQLITE_OK;++cnt)
{
TheTest.Printf(_L("%d \r"), cnt);
sqlite3* dbHandle = NULL;
@@ -818,7 +900,7 @@
TheDb.Close();
//"File I/O" error simulation loop
err = KErrCorrupt;
- for(TInt cnt=1;err<KErrNone;++cnt)
+ for(TInt cnt=0;err<KErrNone;++cnt)
{
TheTest.Printf(_L("%d \r"), cnt);
TEST2(TheDb.Open(KTestDbName), KErrNone);
@@ -901,7 +983,7 @@
TEST(size.iFree > 0);
//"File I/O" error simulation loop
err = KErrCorrupt;
- for(TInt cnt=1;err<KErrNone;++cnt)
+ for(TInt cnt=0;err<KErrNone;++cnt)
{
TheTest.Printf(_L("%d \r"), cnt);
TEST2(TheDb.Open(KTestDbName), KErrNone);
@@ -991,7 +1073,7 @@
TheDb.Close();
err = KErrCorrupt;
- for(TInt cnt=1;err<KErrNone;++cnt)
+ for(TInt cnt=0;err<KErrNone;++cnt)
{
TheTest.Printf(_L("%d \r"), cnt);
TEST2(TheDb.Open(KTestDbName), KErrNone);
@@ -1090,7 +1172,7 @@
TPtr8 bufptr = buf->Des();
err = KErrCorrupt;
- for(TInt cnt=1;err<KErrNone;++cnt)
+ for(TInt cnt=0;err<KErrNone;++cnt)
{
TheTest.Printf(_L("%d \r"), cnt);
TEST2(TheDb.Open(KTestDbName), KErrNone);
@@ -1133,6 +1215,10 @@
OpenDatabaseTest();
TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-SQL-UT-3434 Create database during file I/O error "));
CreateDatabaseTest();
+ TheTest.Next(_L(" @SYMTestCaseID:PDS-SQL-UT-4189 Attach database during file I/O error "));
+ AttachDatabaseTest();
+ TheTest.Next(_L(" @SYMTestCaseID:PDS-SQL-UT-4190 Delete database during file I/O error "));
+ DeleteDatabaseTest();
TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-SQL-UT-3462 Select record test during file I/O error "));
SelectRecordTest();
TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-SQL-UT-3463 Insert record test during file I/O error "));
--- a/persistentstorage/sql/TEST/t_sqlload.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqlload.cpp Thu May 27 14:29:47 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -69,6 +69,14 @@
RSqlDatabase::Delete(KTestDbName1);
}
+void GetHomeTimeAsString(TDes& aStr)
+ {
+ TTime time;
+ time.HomeTime();
+ TDateTime dt = time.DateTime();
+ aStr.Format(_L("%02d:%02d:%02d.%06d"), dt.Hour(), dt.Minute(), dt.Second(), dt.MicroSecond());
+ }
+
///////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////
//Test macros and functions
@@ -115,6 +123,31 @@
///////////////////////////////////////////////////////////////////////////////////////
+//StatementMaxNumberTest() timeouts in WDP builds.
+//This function is used to check whether the time limit is reaqched or not.
+TBool IsTimeLimitReached()
+ {
+ struct TStartTime
+ {
+ TStartTime()
+ {
+ iTime.HomeTime();
+ }
+ TTime iTime;
+ };
+
+ static TStartTime startTime;
+ const TInt KTestTimeLimit = 250;//seconds
+
+ TTime currTime;
+ currTime.HomeTime();
+
+ TTimeIntervalSeconds s;
+ TInt err = currTime.SecondsFrom(startTime.iTime, s);
+ TEST2(err, KErrNone);
+ return s.Int() > KTestTimeLimit;
+ }
+
void CreateTestDir()
{
RFs fs;
@@ -532,10 +565,125 @@
CloseTestThreads(threads, statuses, KTestThreadCnt);
}
+/**
+@SYMTestCaseID PDS-SQL-CT-4201
+@SYMTestCaseDesc Max number of SQL statements test.
+@SYMTestPriority High
+@SYMTestActions The test creates a table with couple of records and then
+ creates as many as possible SQL statements. The expected result is
+ that either the statement creation process will fail with KErrNoMemory or
+ the max number of statements to be created is reached (100000).
+ Then the test deletes 1/2 of the created statements objects and
+ after that attempts to execute Next() on the rest of them.
+ Note that the test has a time limit of 500 seconds. Otherwise on some platforms
+ with WDP feature switched on the test may timeout.
+@SYMTestExpectedResults Test must not fail
+@SYMDEF DEF145236
+*/
+void StatementMaxNumberTest()
+ {
+ TBuf<30> time;
+ GetHomeTimeAsString(time);
+ TheTest.Printf(_L("=== %S: Create database\r\n"), &time);
+
+ (void)RSqlDatabase::Delete(KTestDbName1);
+ RSqlDatabase db;
+ TInt err = db.Create(KTestDbName1);
+ TEST2(err, KErrNone);
+ err = db.Exec(_L("CREATE TABLE A(I INTEGER); INSERT INTO A(I) VALUES(1); INSERT INTO A(I) VALUES(2);"));
+ TEST(err >= 0);
+
+ GetHomeTimeAsString(time);
+ TheTest.Printf(_L("=== %S: Create statements array\r\n"), &time);
+
+ //Reserve memory for the statement objects
+ const TInt KMaxStmtCount = 100000;
+ RSqlStatement* stmt = new RSqlStatement[KMaxStmtCount];
+ TEST(stmt != NULL);
+
+ //Create as many statement objects as possible
+ TInt idx = 0;
+ err = KErrNone;
+ for(;idx<KMaxStmtCount;++idx)
+ {
+ err = stmt[idx].Prepare(db, _L("SELECT * FROM A WHERE I>=0 AND I<10"));
+ if(err != KErrNone)
+ {
+ break;
+ }
+ if((idx % 100) == 0)
+ {
+ GetHomeTimeAsString(time);
+ TheTest.Printf(_L("=== %S: Create % 5d statements\r\n"), &time, idx + 1);
+ if(IsTimeLimitReached())
+ {
+ TheTest.Printf(_L("=== %S: The time limit reached.\r\n"), &time);
+ ++idx;//The idx-th statement is valid, the statement count is idx + 1.
+ break;
+ }
+ }
+ }
+
+ TInt stmtCnt = idx;
+ TheTest.Printf(_L("%d created statement objects. Last error: %d.\r\n"), stmtCnt, err);
+ TEST(err == KErrNone || err == KErrNoMemory);
+
+ //Close 1/2 of the statements to free some memory
+ idx = 0;
+ for(;idx<(stmtCnt/2);++idx)
+ {
+ stmt[idx].Close();
+ if((idx % 100) == 0)
+ {
+ GetHomeTimeAsString(time);
+ TheTest.Printf(_L("=== %S: % 5d statements closed\r\n"), &time, idx + 1);
+ }
+ }
+
+ //Now, there should be enough memory to be able to execute Next() on the rest of the statements
+ for(TInt j=0;idx<stmtCnt;++idx,++j)
+ {
+ err = stmt[idx].Next();
+ TEST2(err, KSqlAtRow);
+ err = stmt[idx].Next();
+ TEST2(err, KSqlAtRow);
+ err = stmt[idx].Next();
+ TEST2(err, KSqlAtEnd);
+ if((j % 100) == 0)
+ {
+ GetHomeTimeAsString(time);
+ TheTest.Printf(_L("=== %S: % 5d statements processed\r\n"), &time, j + 1);
+ }
+ if(IsTimeLimitReached())
+ {
+ TheTest.Printf(_L("=== %S: The time limit reached.\r\n"), &time);
+ break;
+ }
+ }
+
+ //Cleanup
+ for(idx=0;idx<stmtCnt;++idx)
+ {
+ stmt[idx].Close();
+ if((idx % 100) == 0)
+ {
+ GetHomeTimeAsString(time);
+ TheTest.Printf(_L("=== %S: % 5d statements closed\r\n"), &time, idx + 1);
+ }
+ }
+ delete [] stmt;
+ db.Close();
+ (void)RSqlDatabase::Delete(KTestDbName1);
+ GetHomeTimeAsString(time);
+ TheTest.Printf(_L("=== %S: Test case end\r\n"), &time);
+ }
+
void DoTests()
{
TheTest.Start(_L(" @SYMTestCaseID:SYSLIB-SQL-CT-1627-0001 SQL server load test "));
SqlLoadTest();
+ TheTest.Next(_L(" @SYMTestCaseID:PDS-SQL-CT-4201 Statement max number test"));
+ StatementMaxNumberTest();
}
TInt E32Main()
--- a/persistentstorage/sql/TEST/t_sqloom2.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqloom2.cpp Thu May 27 14:29:47 2010 +0300
@@ -45,7 +45,7 @@
//"RSqlStatement::Prepare()" OOM test (8-bit SELECT SQL statement)
void PrepareStmt8L(RSqlDatabase& aDb, RSqlStatement& aStmt)
{
- _LIT8(KSqlString, "SELECT * FROM BBB");
+ _LIT8(KSqlString, "SELECT * FROM BBB WHERE Fld1=? AND Fld4<>?");
TInt err = aStmt.Prepare(aDb, KSqlString);
User::LeaveIfError(err);
}
@@ -53,14 +53,14 @@
//"RSqlStatement::PrepareL()" OOM test (8-bit SELECT SQL statement)
void PrepareStmt8_2L(RSqlDatabase& aDb, RSqlStatement& aStmt)
{
- _LIT8(KSqlString, "SELECT * FROM BBB");
+ _LIT8(KSqlString, "SELECT * FROM BBB WHERE Fld1=? AND Fld4<>?");
aStmt.PrepareL(aDb, KSqlString);
}
//"RSqlStatement::Prepare()" OOM test (8-bit SELECT SQL statement), syntax error
void PrepareBadStmt8L(RSqlDatabase& aDb, RSqlStatement& aStmt)
{
- _LIT8(KSqlString, "SELECT123 * FROM BBB");
+ _LIT8(KSqlString, "SELECT123 * FROM BBB WHERE Fld1=? AND Fld4<>?");
TInt err = aStmt.Prepare(aDb, KSqlString);
User::LeaveIfError(err);
}
@@ -68,16 +68,18 @@
//"RSqlStatement::Prepare()" OOM test (8-bit SELECT SQL statement, move next)
void PrepareMoveStmt8L(RSqlDatabase& aDb, RSqlStatement& aStmt)
{
- _LIT8(KSqlString, "SELECT * FROM BBB");
+ _LIT8(KSqlString, "SELECT * FROM BBB WHERE Fld1=? AND Fld4<>?");
TInt err = aStmt.Prepare(aDb, KSqlString);
- if(err == KErrNone)
- {
- err = aStmt.Next();
- if(err == KSqlAtRow)
- {
- err = KErrNone;
- }
- }
+ User::LeaveIfError(err);
+ err = aStmt.BindInt(0, 1);
+ User::LeaveIfError(err);
+ err = aStmt.BindText(1, _L("data244weewfn43wr83224iu23ewkjfbrektug4i433b3k45b"));
+ User::LeaveIfError(err);
+ err = aStmt.Next();
+ if(err == KSqlAtRow)
+ {
+ err = KErrNone;
+ }
User::LeaveIfError(err);
}
--- a/persistentstorage/sql/TEST/t_sqloom5.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqloom5.cpp Thu May 27 14:29:47 2010 +0300
@@ -614,7 +614,7 @@
attached (secure and non-secure).
UTF8 encoded database is used.
@SYMTestExpectedResults Test must not fail
-@SYMDEF DEF????
+@SYMDEF DEF144603
*/
void Utf8OpenAttachDatabaseOomTest()
{
--- a/persistentstorage/sql/TEST/t_sqlperformance.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqlperformance.cpp Thu May 27 14:29:47 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -19,6 +19,7 @@
#include <hal.h>
#include <stdlib.h>
#include <sqldb.h>
+#include "t_sqlcmdlineutil.h"
#include "SqlSrvStrings.h"
#include "sqlite3.h"
#include "SqliteSymbian.h"
@@ -27,15 +28,12 @@
RTest TheTest(_L("t_sqlperformance test"));
RFs TheFs;
+TBuf<200> TheTestTitle;
+TCmdLineParams TheCmdLineParams;
+TBuf8<200> TheSqlConfigString;
-TBuf<200> TheTestTitle;
-TBuf<256> TheCmd;
-TParse TheParse;
-TBuf<8> TheDriveName;
-
-_LIT8(KDbEncodingUtf8, "encoding=UTF-8");
-_LIT(KDbEncodingUtf8text, "UTF8 encoded db");
-_LIT(KDbEncodingUtf16text, "UTF16 encoded db");
+_LIT(KUtf8, "UTF8 ");
+_LIT(KUtf16, "UTF16");
TFileName TheSecureDbName;
TFileName TheNonSecureDbName;
@@ -43,14 +41,6 @@
TFileName TheNonSecureTmpDbName;
TFileName TheSglRecDbFileName;
-enum TDbEncoding
- {
- EDbUtf8,
- EDbUtf16
- };
-
-TDbEncoding TheDbEncoding;
-
_LIT(KSqlServerPrivateDir, "\\private\\10281e17\\");
_LIT(KCreateDbScript, "z:\\test\\contacts_schema_to_vendors.sql");
@@ -157,9 +147,10 @@
file.Close();
- HBUFC* sql2 = HBUFC::New(size);
+ HBUFC* sql2 = HBUFC::New(size + 1);
TEST(sql2 != NULL);
sql2->Des().Copy(sql->Des());
+ sql2->Des().Append(TChar(0));
delete sql;
return sql2;
@@ -249,7 +240,7 @@
{
RSqlDatabase::Delete(aDbName);
RSqlDatabase db;
- TInt err = db.Create(aDbName, TheDbEncoding == EDbUtf16 ? NULL : &KDbEncodingUtf8);
+ TInt err = db.Create(aDbName, &TheSqlConfigString);
TEST2(err, KErrNone);
CreateDbSchema(db);
db.Close();
@@ -277,7 +268,7 @@
securityPolicy.SetDbPolicy(RSqlSecurityPolicy::EWritePolicy, TSecurityPolicy(ECapabilityWriteUserData));
securityPolicy.SetDbPolicy(RSqlSecurityPolicy::EReadPolicy, TSecurityPolicy(ECapabilityReadUserData));
RSqlDatabase db;
- err = db.Create(aDbName, securityPolicy, TheDbEncoding == EDbUtf16 ? NULL : &KDbEncodingUtf8);
+ err = db.Create(aDbName, securityPolicy, &TheSqlConfigString);
TEST2(err, KErrNone);
securityPolicy.Close();
CreateDbSchema(db);
@@ -505,7 +496,7 @@
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Template class offering Create() and Open() methods for creating/opening a sqlite3 handle.
-template <TDbEncoding TYPE> class TDbHelper2
+template <TCmdLineParams::TDbEncoding TYPE> class TDbHelper2
{
public:
static void Create(const TDesC& aDbName);
@@ -543,7 +534,7 @@
}
//Explicit TDbHelper2 class specialization for creating/opening a database with UTF8 default encoding
-template <> class TDbHelper2<EDbUtf8>
+template <> class TDbHelper2<TCmdLineParams::EDbUtf8>
{
public:
static void Create(const TDesC& aDbFileName)
@@ -581,7 +572,7 @@
};
//Explicit TDbHelper2 class specialization for creating/opening a database with UTF16 default encoding
-template <> class TDbHelper2<EDbUtf16>
+template <> class TDbHelper2<TCmdLineParams::EDbUtf16>
{
public:
static void Create(const TDesC& aDbFileName)
@@ -814,7 +805,7 @@
fmtstr.Copy(aUpdateSql);
sqlite3SymbianLibInit();
- sqlite3* dbHandle = TDbHelper2<EDbUtf8>::Open(aDbName);
+ sqlite3* dbHandle = TDbHelper2<TCmdLineParams::EDbUtf8>::Open(aDbName);
TUint32 start = User::FastCounter();
for(TInt id=1;id<=KTestTecordCount;++id)
@@ -842,7 +833,7 @@
TheTest.Printf(_L("\"Update (without parameters)\" test\r\n"));
sqlite3SymbianLibInit();
- sqlite3* dbHandle = TDbHelper2<EDbUtf16>::Open(aDbName);
+ sqlite3* dbHandle = TDbHelper2<TCmdLineParams::EDbUtf16>::Open(aDbName);
TUint32 start = User::FastCounter();
for(TInt id=1;id<=KTestTecordCount;++id)
@@ -998,7 +989,8 @@
delete sql;
}
-template <TDbEncoding TYPE, class HBUFC, class PTRC, class DESC> void PerformanceTest2(const TDesC& aDbFileName,
+template <TCmdLineParams::TDbEncoding TYPE, class HBUFC, class PTRC, class DESC> void PerformanceTest2(
+ const TDesC& aDbFileName,
const DESC& aCommitStr,
const DESC& aUpdateSql,
const DESC& aSelectSql,
@@ -1039,10 +1031,10 @@
delete fm;
}
//Explicit PerformanceTest2() template instantiations.
-template void PerformanceTest2<EDbUtf8, HBufC8, TPtrC8, TDesC8>(const TDesC&, const TDesC8&, const TDesC8&, const TDesC8&, const TDesC8&);
-template void PerformanceTest2<EDbUtf16, HBufC8, TPtrC8, TDesC8>(const TDesC&, const TDesC8&, const TDesC8&, const TDesC8&, const TDesC8&);
-template void PerformanceTest2<EDbUtf8, HBufC16, TPtrC16, TDesC16>(const TDesC&, const TDesC16&, const TDesC16&, const TDesC16&, const TDesC16&);
-template void PerformanceTest2<EDbUtf16, HBufC16, TPtrC16, TDesC16>(const TDesC&, const TDesC16&, const TDesC16&, const TDesC16&, const TDesC16&);
+template void PerformanceTest2<TCmdLineParams::EDbUtf8, HBufC8, TPtrC8, TDesC8>(const TDesC&, const TDesC8&, const TDesC8&, const TDesC8&, const TDesC8&);
+template void PerformanceTest2<TCmdLineParams::EDbUtf16, HBufC8, TPtrC8, TDesC8>(const TDesC&, const TDesC8&, const TDesC8&, const TDesC8&, const TDesC8&);
+template void PerformanceTest2<TCmdLineParams::EDbUtf8, HBufC16, TPtrC16, TDesC16>(const TDesC&, const TDesC16&, const TDesC16&, const TDesC16&, const TDesC16&);
+template void PerformanceTest2<TCmdLineParams::EDbUtf16, HBufC16, TPtrC16, TDesC16>(const TDesC&, const TDesC16&, const TDesC16&, const TDesC16&, const TDesC16&);
void ColumnValueAccessTest()
{
@@ -1056,7 +1048,7 @@
//Create a test database
RSqlDatabase db;
- TInt err = db.Create(TheNonSecureDbName2);
+ TInt err = db.Create(TheNonSecureDbName2, &TheSqlConfigString);
TEST2(err, KErrNone);
_LIT(KCreateSql, "CREATE TABLE A(%S INTEGER, %S INTEGER, %S INTEGER, %S INTEGER)");
sql.Format(KCreateSql, &colNames[0], &colNames[1], &colNames[2], &colNames[3]);
@@ -1259,57 +1251,50 @@
TheTest.Printf(_L("Single \"delete\" test\r\n"));
SingleDeleteTest();
- TheTestTitle.Copy(_L("SERVER, UTF8 SQL strings, non-secure, "));
- TheTestTitle.Append(TheDbEncoding == EDbUtf16 ? KDbEncodingUtf16text : KDbEncodingUtf8text);
- TheTestTitle.Append(_L("\r\n"));
+ TheTestTitle.Format(_L("SERVER, UTF8 SQL strings, non-secure, encoding: \"%S\", page size: %d\r\n"),
+ TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8, TheCmdLineParams.iPageSize);
TheTest.Printf(TheTestTitle);
PerformanceTest<HBufC8, TPtrC8, TDesC8, ENonSecureDb>(TheNonSecureDbName, KCommitStr8(), KUpdateSql8(), KSelectSql8(), KDeleteSql8());
- TheTestTitle.Copy(_L("SERVER, UTF8 SQL strings, non-secure, "));
- TheTestTitle.Append(TheDbEncoding == EDbUtf16 ? KDbEncodingUtf16text : KDbEncodingUtf8text);
- TheTestTitle.Append(_L(", update test (without parameters)"));
- TheTestTitle.Append(_L("\r\n"));
+ TheTestTitle.Format(_L("SERVER, UTF8 SQL strings, non-secure, update test (without parameters), encoding: \"%S\", page size: %d\r\n"),
+ TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8, TheCmdLineParams.iPageSize);
TheTest.Printf(TheTestTitle);
UpdateWPTest<TBuf8<200>, TDesC8, ENonSecureDb>(TheNonSecureDbName, KUpdateSql2_8());
- TheTestTitle.Copy(_L("SERVER, UTF8 SQL strings, secure, "));
- TheTestTitle.Append(TheDbEncoding == EDbUtf16 ? KDbEncodingUtf16text : KDbEncodingUtf8text);
- TheTestTitle.Append(_L("\r\n"));
+ TheTestTitle.Format(_L("SERVER, UTF8 SQL strings, secure, encoding: \"%S\", page size: %d\r\n"),
+ TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8, TheCmdLineParams.iPageSize);
TheTest.Printf(TheTestTitle);
PerformanceTest<HBufC8, TPtrC8, TDesC8, ESecureDb>(TheSecureDbName, KCommitStr8(), KUpdateSql8(), KSelectSql8(), KDeleteSql8());
TheTest.Printf(_L("SQLITE, UTF8 encoded database, UTF8 SQL strings\r\n"));
- PerformanceTest2<EDbUtf8, HBufC8, TPtrC8, TDesC8>(TheNonSecureDbName, KCommitStr8(), KUpdateSql8(), KSelectSql8(), KDeleteSql8());
+ PerformanceTest2<TCmdLineParams::EDbUtf8, HBufC8, TPtrC8, TDesC8>(TheNonSecureDbName, KCommitStr8(), KUpdateSql8(), KSelectSql8(), KDeleteSql8());
TheTest.Printf(_L("SQLITE, UTF8 encoded database, UTF8 SQL strings, update test (without parameters)\r\n"));
UpdateWPTest2<TDesC8>(TheNonSecureDbName, KUpdateSql2_8());
TheTest.Printf(_L("SQLITE, UTF16 encoded database, UTF8 SQL strings\r\n"));
- PerformanceTest2<EDbUtf16, HBufC8, TPtrC8, TDesC8>(TheNonSecureDbName, KCommitStr8(), KUpdateSql8(), KSelectSql8(), KDeleteSql8());
+ PerformanceTest2<TCmdLineParams::EDbUtf16, HBufC8, TPtrC8, TDesC8>(TheNonSecureDbName, KCommitStr8(), KUpdateSql8(), KSelectSql8(), KDeleteSql8());
- TheTestTitle.Copy(_L("SERVER, UTF16 SQL strings, non-secure, "));
- TheTestTitle.Append(TheDbEncoding == EDbUtf16 ? KDbEncodingUtf16text : KDbEncodingUtf8text);
- TheTestTitle.Append(_L("\r\n"));
+ TheTestTitle.Format(_L("SERVER, UTF16 SQL strings, non-secure, encoding: \"%S\", page size: %d\r\n"),
+ TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8, TheCmdLineParams.iPageSize);
TheTest.Printf(TheTestTitle);
PerformanceTest<HBufC16, TPtrC16, TDesC16, ENonSecureDb>(TheNonSecureDbName, KCommitStr16(), KUpdateSql16(), KSelectSql16(), KDeleteSql16());
- TheTestTitle.Copy(_L("SERVER, UTF16 SQL strings, non-secure, "));
- TheTestTitle.Append(TheDbEncoding == EDbUtf16 ? KDbEncodingUtf16text : KDbEncodingUtf8text);
- TheTestTitle.Append(_L(", update test (without parameters)\r\n"));
+ TheTestTitle.Format(_L("SERVER, UTF16 SQL strings, non-secure, update test (without parameters), encoding: \"%S\", page size: %d\r\n"),
+ TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8, TheCmdLineParams.iPageSize);
TheTest.Printf(TheTestTitle);
UpdateWPTest<TBuf16<200>, TDesC16, ENonSecureDb>(TheNonSecureDbName, KUpdateSql2_16());
- TheTestTitle.Copy(_L("SERVER, UTF16 SQL strings, secure, "));
- TheTestTitle.Append(TheDbEncoding == EDbUtf16 ? KDbEncodingUtf16text : KDbEncodingUtf8text);
- TheTestTitle.Append(_L("\r\n"));
+ TheTestTitle.Format(_L("SERVER, UTF16 SQL strings, secure, encoding: \"%S\", page size: %d\r\n"),
+ TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8, TheCmdLineParams.iPageSize);
TheTest.Printf(TheTestTitle);
PerformanceTest<HBufC16, TPtrC16, TDesC16, ESecureDb>(TheSecureDbName, KCommitStr16(), KUpdateSql16(), KSelectSql16(), KDeleteSql16());
TheTest.Printf(_L("SQLITE, UTF8 encoded database, UTF16 SQL strings\r\n"));
- PerformanceTest2<EDbUtf8, HBufC16, TPtrC16, TDesC16>(TheNonSecureDbName, KCommitStr16(), KUpdateSql16(), KSelectSql16(), KDeleteSql16());
+ PerformanceTest2<TCmdLineParams::EDbUtf8, HBufC16, TPtrC16, TDesC16>(TheNonSecureDbName, KCommitStr16(), KUpdateSql16(), KSelectSql16(), KDeleteSql16());
TheTest.Printf(_L("SQLITE, UTF16 encoded database, UTF16 SQL strings\r\n"));
- PerformanceTest2<EDbUtf16, HBufC16, TPtrC16, TDesC16>(TheNonSecureDbName, KCommitStr16(), KUpdateSql16(), KSelectSql16(), KDeleteSql16());
+ PerformanceTest2<TCmdLineParams::EDbUtf16, HBufC16, TPtrC16, TDesC16>(TheNonSecureDbName, KCommitStr16(), KUpdateSql16(), KSelectSql16(), KDeleteSql16());
TheTest.Printf(_L("SQLITE, UTF16 encoded database, UTF16 SQL strings, update test (without parameters)\r\n"));
UpdateWPTest2<TDesC16>(TheNonSecureDbName, KUpdateSql2_16());
@@ -1322,85 +1307,32 @@
}
-//Usage: "t_sqlperformance [[-16/-8] [<drive letter>:]]"
-
TInt E32Main()
{
TheTest.Title();
CTrapCleanup* tc = CTrapCleanup::New();
-
- TheDbEncoding = EDbUtf16;
+ TheTest(tc != NULL);
- User::CommandLine(TheCmd);
- TheCmd.TrimAll();
- if(TheCmd.Length() > 0)
- {
- TPtrC prm1(KNullDesC);
- TPtrC prm2(KNullDesC);
- TInt pos = TheCmd.Locate(TChar(' '));
- if(pos > 0)
- {
- prm1.Set(TheCmd.Left(pos));
- prm2.Set(TheCmd.Mid(pos + 1));
- }
- else
- {
- prm1.Set(TheCmd);
- }
- if(prm1.Compare(_L("-8")) == 0)
- {
- TheDbEncoding = EDbUtf8;
- TheDriveName.Copy(prm2);
- }
- else if(prm2.Compare(_L("-8")) == 0)
- {
- TheDbEncoding = EDbUtf8;
- TheDriveName.Copy(prm1);
- }
- else if(prm1.Compare(_L("-16")) == 0)
- {
- TheDbEncoding = EDbUtf16;
- TheDriveName.Copy(prm2);
- }
- else if(prm2.Compare(_L("-16")) == 0)
- {
- TheDbEncoding = EDbUtf16;
- TheDriveName.Copy(prm1);
- }
- }
+ GetCmdLineParamsAndSqlConfigString(TheTest, _L("t_sqlperformance"), TheCmdLineParams, TheSqlConfigString);
+ _LIT(KSecureDbName, "c:[2121212A]t_perfdb.db");
+ PrepareDbName(KSecureDbName, TheCmdLineParams.iDriveName, TheSecureDbName);
+ _LIT(KNonSecureDbName, "c:\\test\\t_perfdb.db");
+ PrepareDbName(KNonSecureDbName, TheCmdLineParams.iDriveName, TheNonSecureDbName);
+ _LIT(KNonSecureDbName2, "c:\\test\\t_perfdb2.db");
+ PrepareDbName(KNonSecureDbName2, TheCmdLineParams.iDriveName, TheNonSecureDbName2);
+ _LIT(KNonSecureTmpDbName, "c:\\test\\tmp.db");
+ PrepareDbName(KNonSecureTmpDbName, TheCmdLineParams.iDriveName, TheNonSecureTmpDbName);
+ _LIT(KSglRecDbName, "c:\\test\\default_avacon.dbSQL");
+ PrepareDbName(KSglRecDbName, TheCmdLineParams.iDriveName, TheSglRecDbFileName);
- //Construct test database file names
- _LIT(KSecureDbName, "c:[2121212A]t_perfdb.db");
- TheParse.Set(TheDriveName, &KSecureDbName, 0);
- const TDesC& dbFilePath1 = TheParse.FullName();
- TheSecureDbName.Copy(dbFilePath1);
-
- _LIT(KNonSecureDbName, "c:\\test\\t_perfdb.db");
- TheParse.Set(TheDriveName, &KNonSecureDbName, 0);
- const TDesC& dbFilePath2 = TheParse.FullName();
- TheNonSecureDbName.Copy(dbFilePath2);
-
- _LIT(KNonSecureDbName2, "c:\\test\\t_perfdb2.db");
- TheParse.Set(TheDriveName, &KNonSecureDbName2, 0);
- const TDesC& dbFilePath3 = TheParse.FullName();
- TheNonSecureDbName2.Copy(dbFilePath3);
-
- _LIT(KNonSecureTmpDbName, "c:\\test\\tmp.db");
- TheParse.Set(TheDriveName, &KNonSecureTmpDbName, 0);
- const TDesC& dbFilePath4 = TheParse.FullName();
- TheNonSecureTmpDbName.Copy(dbFilePath4);
-
- _LIT(KSglRecDbName, "c:\\test\\default_avacon.dbSQL");
- TheParse.Set(TheDriveName, &KSglRecDbName, 0);
- const TDesC& dbFilePath5 = TheParse.FullName();
- TheSglRecDbFileName.Copy(dbFilePath5);
+ TheTest.Printf(_L("==Databases: %S, %S, %S, %S, %S\r\n"), &TheSecureDbName, &TheNonSecureDbName,
+ &TheNonSecureDbName2, &TheNonSecureTmpDbName,
+ &TheSglRecDbFileName);
__UHEAP_MARK;
TestEnvInit();
- TheTest.Printf(_L("==Databases: %S, %S, %S, %S, %S\r\n"), &TheSecureDbName, &TheNonSecureDbName,
- &TheNonSecureDbName2, &TheNonSecureTmpDbName, &TheSglRecDbFileName);
DoTests();
TestEnvDestroy();
--- a/persistentstorage/sql/TEST/t_sqlperformance2.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqlperformance2.cpp Thu May 27 14:29:47 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -16,6 +16,7 @@
#include <e32test.h>
#include <bautils.h>
#include <sqldb.h>
+#include "t_sqlcmdlineutil.h"
///////////////////////////////////////////////////////////////////////////////////////
@@ -24,11 +25,14 @@
TFileName TheDbFileName;
RFs TheFs;
-TInt TheBlobSize = 1024 * 256;
+TBuf<200> TheTestTitle;
+TCmdLineParams TheCmdLineParams;
+TBuf8<200> TheSqlConfigString;
-TBuf<256> TheCmd;
-TDriveName TheDriveName;
-TParse TheParse;
+_LIT(KUtf8, "UTF8 ");
+_LIT(KUtf16, "UTF16");
+
+TInt TheBlobSize = 1024 * 256;
///////////////////////////////////////////////////////////////////////////////////////
@@ -69,20 +73,16 @@
{
TInt err = TheFs.Connect();
TEST2(err, KErrNone);
- //Get the drive number from the database file name
- err = TheParse.Set(TheDbFileName, NULL, NULL);
- TEST2(err, KErrNone);
- TPtrC driveName = TheParse.Drive();
- TEST(driveName.Length() > 0);
- TInt driveNumber = -1;
- err = RFs::CharToDrive(driveName[0], driveNumber);
+ //
+ TInt driveNumber = -1;
+ err = RFs::CharToDrive(TheCmdLineParams.iDriveName[0], driveNumber);
TEST2(err, KErrNone);
TDriveNumber driveNo = static_cast <TDriveNumber> (driveNumber);
TDriveInfo driveInfo;
err = TheFs.Drive(driveInfo, driveNo);
TEST2(err, KErrNone);
//Create the test directory
- err = TheFs.MkDir(TheParse.DriveAndPath());
+ err = TheFs.MkDirAll(TheDbFileName);
TEST(err == KErrNone || err == KErrAlreadyExists);
//Print drive info and the database name
_LIT(KType1, "Not present");
@@ -130,7 +130,7 @@
void CreateTestDb()
{
(void)RSqlDatabase::Delete(TheDbFileName);
- TInt err = TheDb.Create(TheDbFileName);
+ TInt err = TheDb.Create(TheDbFileName, &TheSqlConfigString);
TEST2(err, KErrNone);
err = TheDb.Exec(_L8("CREATE TABLE A(B BLOB)"));
TEST2(err, 1);
@@ -531,7 +531,7 @@
(void)RSqlDatabase::Delete(TheDbFileName);
}
-void DoReadBlobIncrL(TDes8& aDes)
+void DoReadBlobIncrL(TDes8& aDes, TInt aMaxLength)
{
TTime t1, t2, t3, t4;
@@ -547,7 +547,7 @@
openTime = t2.MicroSecondsFrom(t1);
t3.HomeTime();
- strm.ReadL(aDes);
+ strm.ReadL(aDes, aMaxLength);
t4.HomeTime();
readTime = t4.MicroSecondsFrom(t3);
@@ -563,7 +563,7 @@
TEST(data != NULL);
TPtr8 dataptr = data->Des();
- TRAPD(err, DoReadBlobIncrL(dataptr));
+ TRAPD(err, DoReadBlobIncrL(dataptr, TheBlobSize));
TEST2(err, KErrNone);
TEST2(dataptr.Length(), TheBlobSize);
@@ -661,7 +661,7 @@
t5.HomeTime();
err = strm.ColumnBinary(stmt, 0);
TEST2(err, KErrNone);
- TRAP(err, strm.ReadL(dataptr));
+ TRAP(err, strm.ReadL(dataptr, TheBlobSize));
t6.HomeTime();
TEST2(err, KErrNone);
TEST2(dataptr.Length(), TheBlobSize);
@@ -746,6 +746,7 @@
const TInt KBufLen = 32768; // 32Kb
HBufC8* buf = HBufC8::NewL(KBufLen);
TPtr8 dataPtr = buf->Des();
+ dataPtr.SetLength(KBufLen);
dataPtr.Fill('A', KBufLen);
CreateTestDb();
@@ -812,6 +813,7 @@
const TInt KBufLen = 32768; // 32Kb
HBufC8* buf = HBufC8::NewL(KBufLen);
TPtr8 dataPtr = buf->Des();
+ dataPtr.SetLength(KBufLen);
dataPtr.Fill('A', KBufLen);
CreateTestDb();
@@ -889,6 +891,7 @@
TInt bufLen = TheBlobSize;
HBufC8* buf = HBufC8::NewL(bufLen);
TPtr8 dataPtr = buf->Des();
+ dataPtr.SetLength(bufLen);
dataPtr.Fill('Z', bufLen);
CreateTestDb();
@@ -953,6 +956,7 @@
TInt bufLen = TheBlobSize;
HBufC8* buf = HBufC8::NewL(bufLen);
TPtr8 dataPtr = buf->Des();
+ dataPtr.SetLength(bufLen);
dataPtr.Fill('Z', bufLen);
CreateTestDb();
@@ -1024,6 +1028,7 @@
TInt bufLen = TheBlobSize;
HBufC8* buf = HBufC8::NewL(bufLen);
TPtr8 dataPtr = buf->Des();
+ dataPtr.SetLength(bufLen);
dataPtr.Fill('A', bufLen);
CreateTestDb();
@@ -1104,10 +1109,14 @@
void DoTests()
{
- TheTest.Start(_L("@SYMTestCaseID:SYSLIB-SQL-UT-4084 SQL, BLOB write, performance tests\r\n"));
+ TheTestTitle.Format(_L("@SYMTestCaseID:SYSLIB-SQL-UT-4084 SQL, BLOB write, performance tests, encoding: \"%S\", page size: %d\r\n"),
+ TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8, TheCmdLineParams.iPageSize);
+ TheTest.Start(TheTestTitle);
BlobWriteTest();
- TheTest.Next(_L("@SYMTestCaseID:SYSLIB-SQL-UT-4085 SQL, BLOB read, performance tests\r\n"));
+ TheTestTitle.Format(_L("@SYMTestCaseID:SYSLIB-SQL-UT-4085 SQL, BLOB read, performance tests, encoding: \"%S\", page size: %d\r\n"),
+ TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8, TheCmdLineParams.iPageSize);
+ TheTest.Next(TheTestTitle);
BlobReadTest();
TheTest.Printf(_L("==================================================================\r\n"));
@@ -1117,33 +1126,41 @@
TheBlobSize = 1024 * 1024 + 128 * 1024;//1.125Mb
- TheTest.Next(_L("@SYMTestCaseID:SYSLIB-SQL-UT-4115 SQL, sequential BLOB writes, performance tests\r\n"));
+ TheTestTitle.Format(_L("@SYMTestCaseID:SYSLIB-SQL-UT-4115 SQL, sequential BLOB writes, performance tests, encoding: \"%S\", page size: %d\r\n"),
+ TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8, TheCmdLineParams.iPageSize);
+ TheTest.Next(TheTestTitle);
TRAPD(err, SequentialWriteTestL());
TEST2(err, KErrNone);
- TheTest.Next(_L("@SYMTestCaseID:SYSLIB-SQL-UT-4116 SQL, transaction sequential BLOB writes, performance tests\r\n"));
+ TheTestTitle.Format(_L("@SYMTestCaseID:SYSLIB-SQL-UT-4116 SQL, transaction sequential BLOB writes, performance tests, encoding: \"%S\", page size: %d\r\n"),
+ TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8, TheCmdLineParams.iPageSize);
+ TheTest.Next(TheTestTitle);
TRAP(err, TransSequentialWriteTestL());
TEST2(err, KErrNone);
TheBlobSize = 256 * 1024 ; // 256Kb
- TheTest.Next(_L("@SYMTestCaseID:SYSLIB-SQL-UT-4117 SQL, whole BLOB write, performance tests\r\n"));
+ TheTestTitle.Format(_L("@SYMTestCaseID:SYSLIB-SQL-UT-4117 SQL, whole BLOB write, performance tests, encoding: \"%S\", page size: %d\r\n"),
+ TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8, TheCmdLineParams.iPageSize);
+ TheTest.Next(TheTestTitle);
TRAP(err, WholeWriteTestL());
TEST2(err, KErrNone);
- TheTest.Next(_L("@SYMTestCaseID:SYSLIB-SQL-UT-4118 SQL, transaction whole BLOB write, performance tests\r\n"));
+ TheTestTitle.Format(_L("@SYMTestCaseID:SYSLIB-SQL-UT-4118 SQL, transaction whole BLOB write, performance tests, encoding: \"%S\", page size: %d\r\n"),
+ TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8, TheCmdLineParams.iPageSize);
+ TheTest.Next(TheTestTitle);
TRAP(err, TransWholeWriteTestL());
TEST2(err, KErrNone);
- TheTest.Next(_L("@SYMTestCaseID:SYSLIB-SQL-UT-4119 SQL, whole BLOB read, performance tests\r\n"));
+ TheTestTitle.Format(_L("@SYMTestCaseID:SYSLIB-SQL-UT-4119 SQL, whole BLOB read, performance tests, encoding: \"%S\", page size: %d\r\n"),
+ TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8, TheCmdLineParams.iPageSize);
+ TheTest.Next(TheTestTitle);
TRAP(err, WholeReadTestL());
TEST2(err, KErrNone);
#endif//!defined __WINS__ && !defined __WINSCW__ && !defined _DEBUG
}
-//Usage: "t_sqlperformance2 [<drive letter>:]"
-
TInt E32Main()
{
TheTest.Title();
@@ -1153,17 +1170,11 @@
__UHEAP_MARK;
- User::CommandLine(TheCmd);
- TheCmd.TrimAll();
- if(TheCmd.Length() > 0)
- {
- TheDriveName.Copy(TheCmd);
- }
+ GetCmdLineParamsAndSqlConfigString(TheTest, _L("t_sqlperformance2"), TheCmdLineParams, TheSqlConfigString);
+ _LIT(KDbName, "c:\\test\\t_sqlperformance2.db");
+ PrepareDbName(KDbName, TheCmdLineParams.iDriveName, TheDbFileName);
- _LIT(KDbName, "c:\\test\\t_sqlperformance2.db");
- TheParse.Set(TheDriveName, &KDbName, 0);
- const TDesC& dbFilePath = TheParse.FullName();
- TheDbFileName.Copy(dbFilePath);
+ TheTest.Printf(_L("==Databases: %S\r\n"), &TheDbFileName);
TestEnvInit();
DoTests();
--- a/persistentstorage/sql/TEST/t_sqlperformance3.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqlperformance3.cpp Thu May 27 14:29:47 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -17,6 +17,7 @@
#include <bautils.h>
#include <hal.h>
#include <sqldb.h>
+#include "t_sqlcmdlineutil.h"
RTest TheTest(_L("t_sqlperformance3 test"));
RSqlDatabase TheDb;
@@ -24,9 +25,12 @@
_LIT(KDbName, "c:\\test\\t_sqlperformance3.db");
TFileName TheDbFileName;
-TBuf<256> TheCmd;
-TDriveName TheDriveName;
-TParse TheParse;
+TBuf<200> TheTestTitle;
+TCmdLineParams TheCmdLineParams(TCmdLineParams::EDbUtf16, 4096, 10000);
+TBuf8<200> TheSqlConfigString;
+
+_LIT(KUtf8, "UTF8 ");
+_LIT(KUtf16, "UTF16");
TInt TheFastCounterFreq = 0;
@@ -156,14 +160,13 @@
void DoCreateDbFile()
{
- _LIT8(KConfig, "page_size=4096;cache_size=10000;");
TUint32 fc1 = User::FastCounter();
- TInt err = TheDb.Create(TheDbFileName, &KConfig);
+ TInt err = TheDb.Create(TheDbFileName, &TheSqlConfigString);
if(err != KErrNone)
{
if(err == KErrAlreadyExists)
{
- err = TheDb.Open(TheDbFileName, &KConfig);
+ err = TheDb.Open(TheDbFileName, &TheSqlConfigString);
if(err == KErrNone)
{
TUint32 fc2 = User::FastCounter();
@@ -1080,19 +1083,19 @@
{
CalcIterationsCount();
- TheTest.Start(_L("@SYMTestCaseID:PDS-SQL-UT-4149 Create database"));
+ TheTestTitle.Format(_L("@SYMTestCaseID:PDS-SQL-UT-4149 Create database, encoding: \"%S\", page size: %d\r\n"),
+ TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8, TheCmdLineParams.iPageSize);
+ TheTest.Start(TheTestTitle);
CreateDb();
- TBuf<80> buf;
- buf.Format(_L("@SYMTestCaseID:PDS-SQL-UT-4150 Harvest %d items"), KItemCnt);
- TheTest.Next(buf);
+ TheTestTitle.Format(_L("@SYMTestCaseID:PDS-SQL-UT-4150 Harvest %d items, encoding: \"%S\", page size: %d\r\n"),
+ KItemCnt, TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8, TheCmdLineParams.iPageSize);
+ TheTest.Next(TheTestTitle);
Harvest();
PrintResults();
}
-//Usage: "t_sqlperformance3 [<drive letter>:]"
-
TInt E32Main()
{
TheTest.Title();
@@ -1101,17 +1104,11 @@
TheTest(tc != NULL);
__UHEAP_MARK;
-
- User::CommandLine(TheCmd);
- TheCmd.TrimAll();
- if(TheCmd.Length() > 0)
- {
- TheDriveName.Copy(TheCmd);
- }
- TheParse.Set(TheDriveName, &KDbName, 0);
- const TDesC& dbFilePath = TheParse.FullName();
- TheDbFileName.Copy(dbFilePath);
- TheTest.Printf(_L("==Database file name: %S\r\n"), &TheDbFileName);
+
+ GetCmdLineParamsAndSqlConfigString(TheTest, _L("t_sqlperformance3"), TheCmdLineParams, TheSqlConfigString);
+ PrepareDbName(KDbName, TheCmdLineParams.iDriveName, TheDbFileName);
+
+ TheTest.Printf(_L("==Databases: %S\r\n"), &TheDbFileName);
TestEnvDestroy();
TestEnvInit();
--- a/persistentstorage/sql/TEST/t_sqlperformance4.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqlperformance4.cpp Thu May 27 14:29:47 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -17,6 +17,7 @@
#include <bautils.h>
#include <sqldb.h>
#include <hal.h>
+#include "t_sqlcmdlineutil.h"
///////////////////////////////////////////////////////////////////////////////////////
@@ -27,11 +28,12 @@
_LIT(KCDriveDatabase, "c:[a000017f]t_sqlperformance4.db");
TFileName TheDbFileName;
-TBuf<256> TheCmd;
-TDriveName TheDriveName;
-TParse TheParse;
+TBuf<200> TheTestTitle;
+TCmdLineParams TheCmdLineParams;
+TBuf8<200> TheSqlConfigString;
-_LIT8( KMCSqlConfig, "cache_size=1024; page_size=1024; " );
+_LIT(KUtf8, "UTF8 ");
+_LIT(KUtf16, "UTF16");
_LIT(KMusicCreateTable, "CREATE TABLE Music("
L"UniqueId INTEGER PRIMARY KEY,"
@@ -194,14 +196,8 @@
TheTest.Printf(_L("Creating Database %S\n"), &aDbName);
- TInt err = TheDbC.Create(aDbName, securityPolicy, &KMCSqlConfig);
-
- TBuf<64> tmp;
- tmp.Copy(KMCSqlConfig);
- tmp.Append(_L("\n"));
-
- TheTest.Printf(tmp);
-
+ TInt err = TheDbC.Create(aDbName, securityPolicy, &TheSqlConfigString);
+
if (KErrAlreadyExists == err)
{
@@ -210,7 +206,7 @@
User::LeaveIfError(TheDbC.Delete(aDbName));
// try again
- err = TheDbC.Create(aDbName, securityPolicy, &KMCSqlConfig);
+ err = TheDbC.Create(aDbName, securityPolicy, &TheSqlConfigString);
}
@@ -280,7 +276,7 @@
TEST2(sql.Length(), fileLen);
//Open main database
- err = TheDbC.Open(TheDbFileName);
+ err = TheDbC.Open(TheDbFileName, &TheSqlConfigString);
TEST2(err, KErrNone);
TheTest.Printf(_L("Beginning INSERTS...\n"));
@@ -372,13 +368,13 @@
void DoTests()
{
- TheTest.Start(_L("@SYMTestCaseID:PDS-SQL-UT-4151; SQL Music Player Db Performance Test"));
+ TheTestTitle.Format(_L("@SYMTestCaseID:PDS-SQL-UT-4151; SQL Music Player Db Performance Test, encoding: \"%S\", page size: %d\r\n"),
+ TheCmdLineParams.iDbEncoding == TCmdLineParams::EDbUtf16 ? &KUtf16 : &KUtf8, TheCmdLineParams.iPageSize);
+ TheTest.Start(TheTestTitle);
RunTest();
}
-//Usage: "t_sqlperformance4 [<drive letter>:]"
-
TInt E32Main()
{
TheTest.Title();
@@ -388,16 +384,10 @@
__UHEAP_MARK;
- User::CommandLine(TheCmd);
- TheCmd.TrimAll();
- if(TheCmd.Length() > 0)
- {
- TheDriveName.Copy(TheCmd);
- }
- TheParse.Set(TheDriveName, &KCDriveDatabase, 0);
- const TDesC& dbFilePath = TheParse.FullName();
- TheDbFileName.Copy(dbFilePath);
- TheTest.Printf(_L("==Database file name: %S\r\n"), &TheDbFileName);
+ GetCmdLineParamsAndSqlConfigString(TheTest, _L("t_sqlperformance4"), TheCmdLineParams, TheSqlConfigString);
+ PrepareDbName(KCDriveDatabase, TheCmdLineParams.iDriveName, TheDbFileName);
+
+ TheTest.Printf(_L("==Databases: %S\r\n"), &TheDbFileName);
TestEnvInit();
--- a/persistentstorage/sql/TEST/t_sqlprivcage.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqlprivcage.cpp Thu May 27 14:29:47 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -242,6 +242,9 @@
//Very long private database name
err = db.Create(_L("c:\\private\\21212124\\hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh.db"));
TEST2(err, KErrBadName);
+ //Private database name without drive letter
+ err = db.Create(_L("\\private\\21212124\\dbname_no_drive_letter.db"));
+ TEST2(err, KErrBadName);
//Zero length private database name
err = db.Create(_L(""));
TEST2(err, KErrBadName);
@@ -302,10 +305,14 @@
TEST2(err, 1);
db2.Close();
- //Open database 1, attach database 2
+ //Open database 1
RSqlDatabase db;
err = db.Open(KTestDb1);
TEST2(err, KErrNone);
+ //An attempt to attach a database with zero length name
+ err = db.Attach(_L(""), _L("Db2"));
+ TEST2(err, KErrBadName);
+ //Attach database 2
err = db.Attach(KTestDb2, _L("Db2"));
TEST2(err, KErrNone);
@@ -349,6 +356,32 @@
stmt.Close();
db.Close();
+ //Open database 1, attach read-only database 2
+ err = db.Open(KTestDb1);
+ TEST2(err, KErrNone);
+ //Make database 2 read-only.
+ err = TheFs.SetAtt(KTestDb2, KEntryAttReadOnly, 0);
+ TEST2(err, KErrNone);
+ //Attach database 2
+ err = db.Attach(KTestDb2, _L("Db2"));
+ TEST2(err, KErrNone);
+ //
+ err = db.Exec(_L("INSERT INTO Db2.A(ID, T) VALUES(3, 'AAA')"));
+ TPtrC errmsg = db.LastErrorMessage();
+ TheTest.Printf(_L(" === Read-only private attached database. Msg=%S, err=%d\r\n"), &errmsg, err);
+ TEST(err != KErrNone);
+ TSqlScalarFullSelectQuery q(db);
+ TBuf<20> text2;
+ TRAP(err, q.SelectTextL(_L("SELECT T FROM Db2.A WHERE ID=2"), text2));
+ TEST2(err, KErrNone);
+ TEST(text2 == _L("AAA"));
+ //
+ err = db.Detach(_L("Db2"));
+ TEST2(err, KErrNone);
+ err = TheFs.SetAtt(KTestDb2, 0, KEntryAttReadOnly);
+ TEST2(err, KErrNone);
+ db.Close();
+
err = RSqlDatabase::Delete(KTestDb2);
TEST2(err, KErrNone);
err = RSqlDatabase::Delete(KTestDb1);
--- a/persistentstorage/sql/TEST/t_sqlscalarfullselect.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqlscalarfullselect.cpp Thu May 27 14:29:47 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -321,6 +321,75 @@
DestroyTestDb(db);
}
+/**
+@SYMTestCaseID PDS-SQL-CT-4204
+@SYMTestCaseDesc TSqlScalarFullSelectQuery - border test.
+@SYMTestPriority High
+@SYMTestActions The test checks some border test cases such as:
+ - retrieving NULL column as integer;
+ - retrieving NULL column as 64-bit integer;
+ - retrieving NULL column as TReal;
+ - retrieving column value smaller than KMinTInt, as integer;
+ - retrieving column value bigger than KMaxTInt, as integer;
+@SYMTestExpectedResults Test must not fail
+*/
+void ScalarFullSelectBorderTest()
+ {
+ (void)RSqlDatabase::Delete(KTestDatabase1);
+ RSqlDatabase db;
+ TInt rc = db.Create(KTestDatabase1);
+ TEST2(rc, KErrNone);
+ rc = db.Exec(_L("CREATE TABLE A(F1 INTEGER NULL, F2 INTEGER NULL, F3 FLOAT NULL, F4 TEXT NULL, F5 BLOB NULL)"));
+ TEST(rc >= 0);
+
+ TSqlScalarFullSelectQuery q(db);
+
+ //Insert one record. Bigger than KMaxTInt F1 column value. Smaller than KMinTInt F2 column value.
+ rc = db.Exec(_L("INSERT INTO A(F1,F2,F4) VALUES(5000000000,-5000000000,'aljhsfdlgefberveurfgvefkjgs;kjfgs;kjfsd')"));
+ TEST2(rc, 1);
+ //Select NULL column value as int.
+ TInt res = -1;
+ TRAP(rc, res = q.SelectIntL(_L("SELECT F5 FROM A")));
+ TEST2(rc, KErrNone);
+ TEST2(res, 0);
+ //Select NULL column value as int64.
+ res = -1;
+ TRAP(rc, res = q.SelectInt64L(_L("SELECT F5 FROM A")));
+ TEST2(rc, KErrNone);
+ TEST2(res, 0);
+ //Select NULL column value as TReal.
+ TReal res2 = -1.0;
+ TRAP(rc, res2 = q.SelectRealL(_L("SELECT F5 FROM A")));
+ TEST2(rc, KErrNone);
+ TEST(Abs(res2) < 0.000001);
+ //Select NULL column value as text.
+ TBuf<10> text;
+ TRAP(rc, res = q.SelectTextL(_L("SELECT F5 FROM A"), text));
+ TEST2(rc, KErrNone);
+ TEST2(res, 0);
+ TEST2(text.Length(), 0);
+ //Select NULL column value as binary.
+ TBuf8<10> data;
+ TRAP(rc, res = q.SelectBinaryL(_L("SELECT F5 FROM A"), data));
+ TEST2(rc, KErrNone);
+ TEST2(res, 0);
+ TEST2(data.Length(), 0);
+ //Select column value bigger than KMaxTInt, as int.
+ res = -1;
+ TRAP(rc, res = q.SelectIntL(_L("SELECT F1 FROM A")));
+ TEST2(rc, KErrNone);
+ TEST2(res, KMaxTInt);
+ //Select column value smaller than KMinTInt, as int.
+ res = -1;
+ TRAP(rc, res = q.SelectIntL(_L("SELECT F2 FROM A")));
+ TEST2(rc, KErrNone);
+ TEST2(res, KMinTInt);
+
+ db.Close();
+ (void)RSqlDatabase::Delete(KTestDatabase1);
+ }
+
+
void DoTestsL()
{
TheTest.Start(_L(" @SYMTestCaseID:SYSLIB-SQL-CT-1809 Scalar fullselect test. 16-bit SQL "));
@@ -334,6 +403,9 @@
TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-SQL-CT-1810 Scalar fullselect - negative test. 8-bit SQL "));
ScalarFullSelectNegativeTestL< TBuf8<100> >();
+
+ TheTest.Next(_L(" @SYMTestCaseID:PDS-SQL-CT-4204 Scalar fullselect - border cases "));
+ ScalarFullSelectBorderTest();
}
TInt E32Main()
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/sql/TEST/t_sqlsecurity6.cpp Thu May 27 14:29:47 2010 +0300
@@ -0,0 +1,127 @@
+// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+//
+#include <e32test.h>
+#include <bautils.h>
+#include <sqldb.h>
+
+///////////////////////////////////////////////////////////////////////////////////////
+
+RSqlDatabase TheDb;
+RTest TheTest(_L("t_sqlsecurity6 test"));
+
+///////////////////////////////////////////////////////////////////////////////////////
+
+void DestroyTestEnv()
+ {
+ TheDb.Close();
+ (void)RSqlDatabase::Delete(_L("c:[00009876]"));
+ }
+
+///////////////////////////////////////////////////////////////////////////////////////
+//Test macros and functions
+void Check1(TInt aValue, TInt aLine)
+ {
+ if(!aValue)
+ {
+ DestroyTestEnv();
+ RDebug::Print(_L("*** Boolean expression evaluated to false. Line %d\r\n"), aLine);
+ TheTest(EFalse, aLine);
+ }
+ }
+void Check2(TInt aValue, TInt aExpected, TInt aLine)
+ {
+ if(aValue != aExpected)
+ {
+ DestroyTestEnv();
+ RDebug::Print(_L("*** Line %d, Expected error: %d, got: %d\r\n"), aLine, aExpected, aValue);
+ TheTest(EFalse, aLine);
+ }
+ }
+#define TEST(arg) ::Check1((arg), __LINE__)
+#define TEST2(aValue, aExpected) ::Check2(aValue, aExpected, __LINE__)
+
+///////////////////////////////////////////////////////////////////////////////////////
+
+/**
+@SYMTestCaseID PDS-SQL-CT-4199
+@SYMTestCaseDesc Invalid secure database UIDs test.
+@SYMTestPriority High
+@SYMTestActions The test attempts to create a secure database using invalid UIDs:
+ - with length less than 8 hes digits;
+ - with invalid characters in the UID;
+ - wiht database name containing the UID only;
+@SYMTestExpectedResults Test must not fail
+@SYMDEF DEF145236
+*/
+void InvalidSecureUidsTest()
+ {
+ RSqlSecurityPolicy policy;
+ TInt err = policy.Create(TSecurityPolicy::EAlwaysPass);
+ TEST2(err, KErrNone);
+
+ //The UID in the database name is too short. It must be 8 hex digits UID.
+ err = TheDb.Create(_L("c:[9876]t_sqlsecurity6.db"), policy);
+ TEST2(err, KErrArgument);
+
+ //Short UID, used as a database name.
+ err = TheDb.Create(_L("c:[9876]"), policy);
+ TEST2(err, KErrArgument);
+
+ //Invalid UID.
+ err = TheDb.Create(_L("c:[KH0A0Q0J]"), policy);
+ TEST2(err, KErrArgument);
+
+ //UID, used as a database name.
+ err = TheDb.Create(_L("c:[00009876]"), policy);
+ TEST2(err, KErrNone);
+ err = TheDb.Exec(_L("CREATE TABLE A(I INTEGER)"));
+ TEST(err >= 0);
+ TheDb.Close();
+ err = RSqlDatabase::Delete(_L("c:[00009876]"));
+ TEST2(err, KErrNone);
+
+ policy.Close();
+ }
+
+void DoTestsL()
+ {
+ TheTest.Start(_L("@SYMTestCaseID:PDS-SQL-CT-4199 Invalid secure UIDs test"));
+ InvalidSecureUidsTest();
+ }
+
+TInt E32Main()
+ {
+ TheTest.Title();
+
+ CTrapCleanup* tc = CTrapCleanup::New();
+ TheTest(tc != NULL);
+
+ __UHEAP_MARK;
+
+ TRAPD(err, DoTestsL());
+ DestroyTestEnv();
+ TEST2(err, KErrNone);
+
+ __UHEAP_MARKEND;
+
+ TheTest.End();
+ TheTest.Close();
+
+ delete tc;
+
+ User::Heap().Check();
+ return KErrNone;
+ }
--- a/persistentstorage/sql/TEST/t_sqlstartup.cpp Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sql/TEST/t_sqlstartup.cpp Thu May 27 14:29:47 2010 +0300
@@ -22,6 +22,9 @@
_LIT(KCfgDb1ConfigFilePath, "c:\\private\\10281e17\\cfg[10281E17]t_sqlstartup1.db.02"); // config file version 2 for t_sqlstartup1.db
_LIT(KCfgDb2ConfigFilePath, "c:\\private\\10281e17\\cfg[10281E17]t_sqlstartup2.db.05"); // config file version 5 for t_sqlstartup2.db
+//This subdir is created by t_sqlenvcreate app. It should not be returned in the list of files for backup.
+_LIT(KPrivateSubDir, "c:\\private\\10281e17\\TestDir.db");
+
///////////////////////////////////////////////////////////////////////////////////////
RTest TheTest(_L("t_sqlstartup test"));
@@ -189,7 +192,18 @@
const TUid KDbUd = {0x98765432};
RArray<TParse> files;
TRAP(err, server->GetBackUpListL(KDbUd, files));
- fileCnt = files.Count();
+ fileCnt = files.Count();
+ if(err == KErrNone)
+ {
+ //No directories should be returned in the list of files for backup
+ for(TInt i=0;i<fileCnt;++i)
+ {
+ const TParse& parse = files[i];
+ TPtrC fname = parse.FullName();
+ TInt rc = KPrivateSubDir().CompareF(parse.FullName());
+ TEST(rc != 0);
+ }
+ }
files.Close();
OomPostStep();
}
@@ -221,7 +235,7 @@
{
TheTest.Printf(_L("===Simulated error: %d\r\nIteration: "), fsError);
err = KErrNotFound;
- TInt cnt=1;
+ TInt cnt=0;
while(err<KErrNone)
{
TheTest.Printf(_L("%d "), cnt);
@@ -259,7 +273,7 @@
TheTest.Printf(_L("===Simulated error: %d\r\nIteration: "), fsError);
err = KErrNotFound;
TInt fileCnt = 0;
- TInt cnt=1;
+ TInt cnt=0;
while(err<KErrNone)
{
TheTest.Printf(_L("%d "), cnt);
@@ -268,6 +282,17 @@
RArray<TParse> files;
TRAP(err, server->GetBackUpListL(KDbUd, files));
fileCnt = files.Count();
+ if(err == KErrNone)
+ {
+ //No directories should be returned in the list of files for backup
+ for(TInt i=0;i<fileCnt;++i)
+ {
+ const TParse& parse = files[i];
+ TPtrC fname = parse.FullName();
+ TInt rc = KPrivateSubDir().CompareF(parse.FullName());
+ TEST(rc != 0);
+ }
+ }
files.Close();
(void)server->Fs().SetErrorCondition(KErrNone);
if(err != KErrNone)
--- a/persistentstorage/sqlite3api/GROUP/BLD.INF Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/sqlite3api/GROUP/BLD.INF Thu May 27 14:29:47 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -53,7 +53,4 @@
../GROUP/t_sqlitedef.mmp
../GROUP/t_sqlitedb64.mmp manual
-
-PRJ_TESTEXTENSIONS
-start extension syslibs/test/sqlite3_copysqlite3testfiles
-end
+#include "sqlite3test.inf"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/persistentstorage/sqlite3api/GROUP/sqlite3test.inf Thu May 27 14:29:47 2010 +0300
@@ -0,0 +1,427 @@
+// Copyright (c 2010 Nokia Corporation and/or its subsidiary(-ies.
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// This file copies SQLite3 TCL scripts and test files to the target location
+//
+//
+
+/**
+ @file
+*/
+
+PRJ_TESTEXPORTS
+
+../TEST/TclScript/speed1p.explain z:/private/10285A82/speed1p.explain
+../TEST/TclScript/speed4p.explain z:/private/10285A82/speed4p.explain
+../TEST/TclScript/fuzz_common.tcl z:/private/10285A82/fuzz_common.tcl
+../TEST/TclScript/malloc_common.tcl z:/private/10285A82/malloc_common.tcl
+../TEST/TclScript/tester.tcl z:/private/10285A82/tester.tcl
+../TEST/TclScript/thread_common.tcl z:/private/10285A82/thread_common.tcl
+../TEST/TclScript/trans2.test.gz z:/private/10285A82/trans2.test.gz
+../TEST/TclScript/aggerror.test z:/private/10285A82/aggerror.test
+../TEST/TclScript/alias.test z:/private/10285A82/alias.test
+../TEST/TclScript/all.test z:/private/10285A82/all.test
+../TEST/TclScript/alter.test z:/private/10285A82/alter.test
+../TEST/TclScript/alter2.test z:/private/10285A82/alter2.test
+../TEST/TclScript/alter3.test z:/private/10285A82/alter3.test
+../TEST/TclScript/altermalloc.test z:/private/10285A82/altermalloc.test
+../TEST/TclScript/analyze.test z:/private/10285A82/analyze.test
+../TEST/TclScript/async.test z:/private/10285A82/async.test
+../TEST/TclScript/async2.test z:/private/10285A82/async2.test
+../TEST/TclScript/async3.test z:/private/10285A82/async3.test
+../TEST/TclScript/attach.test z:/private/10285A82/attach.test
+../TEST/TclScript/attach2.test z:/private/10285A82/attach2.test
+../TEST/TclScript/attach3.test z:/private/10285A82/attach3.test
+../TEST/TclScript/attachmalloc.test z:/private/10285A82/attachmalloc.test
+../TEST/TclScript/auth.test z:/private/10285A82/auth.test
+../TEST/TclScript/auth2.test z:/private/10285A82/auth2.test
+../TEST/TclScript/autoinc.test z:/private/10285A82/autoinc.test
+../TEST/TclScript/autovacuum.test z:/private/10285A82/autovacuum.test
+../TEST/TclScript/autovacuum_ioerr2.test z:/private/10285A82/autovacuum_ioerr2.test
+../TEST/TclScript/avtrans.test z:/private/10285A82/avtrans.test
+../TEST/TclScript/badutf.test z:/private/10285A82/badutf.test
+../TEST/TclScript/between.test z:/private/10285A82/between.test
+../TEST/TclScript/bigfile.test z:/private/10285A82/bigfile.test
+../TEST/TclScript/bigrow.test z:/private/10285A82/bigrow.test
+../TEST/TclScript/bind.test z:/private/10285A82/bind.test
+../TEST/TclScript/bindxfer.test z:/private/10285A82/bindxfer.test
+../TEST/TclScript/bitvec.test z:/private/10285A82/bitvec.test
+../TEST/TclScript/blob.test z:/private/10285A82/blob.test
+../TEST/TclScript/busy.test z:/private/10285A82/busy.test
+../TEST/TclScript/cache.test z:/private/10285A82/cache.test
+../TEST/TclScript/capi2.test z:/private/10285A82/capi2.test
+../TEST/TclScript/capi3.test z:/private/10285A82/capi3.test
+../TEST/TclScript/capi3b.test z:/private/10285A82/capi3b.test
+../TEST/TclScript/capi3c.test z:/private/10285A82/capi3c.test
+../TEST/TclScript/capi3d.test z:/private/10285A82/capi3d.test
+../TEST/TclScript/cast.test z:/private/10285A82/cast.test
+../TEST/TclScript/check.test z:/private/10285A82/check.test
+../TEST/TclScript/collate1.test z:/private/10285A82/collate1.test
+../TEST/TclScript/collate2.test z:/private/10285A82/collate2.test
+../TEST/TclScript/collate3.test z:/private/10285A82/collate3.test
+../TEST/TclScript/collate4.test z:/private/10285A82/collate4.test
+../TEST/TclScript/collate5.test z:/private/10285A82/collate5.test
+../TEST/TclScript/collate6.test z:/private/10285A82/collate6.test
+../TEST/TclScript/collate7.test z:/private/10285A82/collate7.test
+../TEST/TclScript/collate8.test z:/private/10285A82/collate8.test
+../TEST/TclScript/collate9.test z:/private/10285A82/collate9.test
+../TEST/TclScript/collateA.test z:/private/10285A82/collateA.test
+../TEST/TclScript/colmeta.test z:/private/10285A82/colmeta.test
+../TEST/TclScript/colname.test z:/private/10285A82/colname.test
+../TEST/TclScript/conflict.test z:/private/10285A82/conflict.test
+../TEST/TclScript/corrupt.test z:/private/10285A82/corrupt.test
+../TEST/TclScript/corrupt2.test z:/private/10285A82/corrupt2.test
+../TEST/TclScript/corrupt3.test z:/private/10285A82/corrupt3.test
+../TEST/TclScript/corrupt4.test z:/private/10285A82/corrupt4.test
+../TEST/TclScript/corrupt5.test z:/private/10285A82/corrupt5.test
+../TEST/TclScript/corrupt6.test z:/private/10285A82/corrupt6.test
+../TEST/TclScript/corrupt7.test z:/private/10285A82/corrupt7.test
+../TEST/TclScript/corrupt8.test z:/private/10285A82/corrupt8.test
+../TEST/TclScript/corrupt9.test z:/private/10285A82/corrupt9.test
+../TEST/TclScript/corruptA.test z:/private/10285A82/corruptA.test
+../TEST/TclScript/crash.test z:/private/10285A82/crash.test
+../TEST/TclScript/crash2.test z:/private/10285A82/crash2.test
+../TEST/TclScript/crash3.test z:/private/10285A82/crash3.test
+../TEST/TclScript/crash4.test z:/private/10285A82/crash4.test
+../TEST/TclScript/crash5.test z:/private/10285A82/crash5.test
+../TEST/TclScript/crash6.test z:/private/10285A82/crash6.test
+../TEST/TclScript/crash7.test z:/private/10285A82/crash7.test
+../TEST/TclScript/createtab.test z:/private/10285A82/createtab.test
+../TEST/TclScript/cse.test z:/private/10285A82/cse.test
+../TEST/TclScript/date.test z:/private/10285A82/date.test
+../TEST/TclScript/default.test z:/private/10285A82/default.test
+../TEST/TclScript/delete.test z:/private/10285A82/delete.test
+../TEST/TclScript/delete2.test z:/private/10285A82/delete2.test
+../TEST/TclScript/delete3.test z:/private/10285A82/delete3.test
+../TEST/TclScript/descidx1.test z:/private/10285A82/descidx1.test
+../TEST/TclScript/descidx2.test z:/private/10285A82/descidx2.test
+../TEST/TclScript/descidx3.test z:/private/10285A82/descidx3.test
+../TEST/TclScript/diskfull.test z:/private/10285A82/diskfull.test
+../TEST/TclScript/distinctagg.test z:/private/10285A82/distinctagg.test
+../TEST/TclScript/enc.test z:/private/10285A82/enc.test
+../TEST/TclScript/enc2.test z:/private/10285A82/enc2.test
+../TEST/TclScript/enc3.test z:/private/10285A82/enc3.test
+../TEST/TclScript/eval.test z:/private/10285A82/eval.test
+../TEST/TclScript/exclusive.test z:/private/10285A82/exclusive.test
+../TEST/TclScript/exclusive2.test z:/private/10285A82/exclusive2.test
+../TEST/TclScript/exec.test z:/private/10285A82/exec.test
+../TEST/TclScript/expr.test z:/private/10285A82/expr.test
+../TEST/TclScript/filectrl.test z:/private/10285A82/filectrl.test
+../TEST/TclScript/filefmt.test z:/private/10285A82/filefmt.test
+../TEST/TclScript/fkey1.test z:/private/10285A82/fkey1.test
+../TEST/TclScript/format4.test z:/private/10285A82/format4.test
+../TEST/TclScript/fts1a.test z:/private/10285A82/fts1a.test
+../TEST/TclScript/fts1b.test z:/private/10285A82/fts1b.test
+../TEST/TclScript/fts1c.test z:/private/10285A82/fts1c.test
+../TEST/TclScript/fts1d.test z:/private/10285A82/fts1d.test
+../TEST/TclScript/fts1e.test z:/private/10285A82/fts1e.test
+../TEST/TclScript/fts1f.test z:/private/10285A82/fts1f.test
+../TEST/TclScript/fts1i.test z:/private/10285A82/fts1i.test
+../TEST/TclScript/fts1j.test z:/private/10285A82/fts1j.test
+../TEST/TclScript/fts1k.test z:/private/10285A82/fts1k.test
+../TEST/TclScript/fts1l.test z:/private/10285A82/fts1l.test
+../TEST/TclScript/fts1m.test z:/private/10285A82/fts1m.test
+../TEST/TclScript/fts1n.test z:/private/10285A82/fts1n.test
+../TEST/TclScript/fts1o.test z:/private/10285A82/fts1o.test
+../TEST/TclScript/fts1porter.test z:/private/10285A82/fts1porter.test
+../TEST/TclScript/fts2.test z:/private/10285A82/fts2.test
+../TEST/TclScript/fts2a.test z:/private/10285A82/fts2a.test
+../TEST/TclScript/fts2b.test z:/private/10285A82/fts2b.test
+../TEST/TclScript/fts2c.test z:/private/10285A82/fts2c.test
+../TEST/TclScript/fts2d.test z:/private/10285A82/fts2d.test
+../TEST/TclScript/fts2e.test z:/private/10285A82/fts2e.test
+../TEST/TclScript/fts2f.test z:/private/10285A82/fts2f.test
+../TEST/TclScript/fts2g.test z:/private/10285A82/fts2g.test
+../TEST/TclScript/fts2h.test z:/private/10285A82/fts2h.test
+../TEST/TclScript/fts2i.test z:/private/10285A82/fts2i.test
+../TEST/TclScript/fts2j.test z:/private/10285A82/fts2j.test
+../TEST/TclScript/fts2k.test z:/private/10285A82/fts2k.test
+../TEST/TclScript/fts2l.test z:/private/10285A82/fts2l.test
+../TEST/TclScript/fts2m.test z:/private/10285A82/fts2m.test
+../TEST/TclScript/fts2n.test z:/private/10285A82/fts2n.test
+../TEST/TclScript/fts2o.test z:/private/10285A82/fts2o.test
+../TEST/TclScript/fts2p.test z:/private/10285A82/fts2p.test
+../TEST/TclScript/fts2q.test z:/private/10285A82/fts2q.test
+../TEST/TclScript/fts2r.test z:/private/10285A82/fts2r.test
+../TEST/TclScript/fts2token.test z:/private/10285A82/fts2token.test
+../TEST/TclScript/fts3.test z:/private/10285A82/fts3.test
+../TEST/TclScript/fts3aa.test z:/private/10285A82/fts3aa.test
+../TEST/TclScript/fts3ab.test z:/private/10285A82/fts3ab.test
+../TEST/TclScript/fts3ac.test z:/private/10285A82/fts3ac.test
+../TEST/TclScript/fts3ad.test z:/private/10285A82/fts3ad.test
+../TEST/TclScript/fts3ae.test z:/private/10285A82/fts3ae.test
+../TEST/TclScript/fts3af.test z:/private/10285A82/fts3af.test
+../TEST/TclScript/fts3ag.test z:/private/10285A82/fts3ag.test
+../TEST/TclScript/fts3ah.test z:/private/10285A82/fts3ah.test
+../TEST/TclScript/fts3ai.test z:/private/10285A82/fts3ai.test
+../TEST/TclScript/fts3aj.test z:/private/10285A82/fts3aj.test
+../TEST/TclScript/fts3ak.test z:/private/10285A82/fts3ak.test
+../TEST/TclScript/fts3al.test z:/private/10285A82/fts3al.test
+../TEST/TclScript/fts3am.test z:/private/10285A82/fts3am.test
+../TEST/TclScript/fts3an.test z:/private/10285A82/fts3an.test
+../TEST/TclScript/fts3ao.test z:/private/10285A82/fts3ao.test
+../TEST/TclScript/fts3atoken.test z:/private/10285A82/fts3atoken.test
+../TEST/TclScript/fts3b.test z:/private/10285A82/fts3b.test
+../TEST/TclScript/fts3c.test z:/private/10285A82/fts3c.test
+../TEST/TclScript/fts3d.test z:/private/10285A82/fts3d.test
+../TEST/TclScript/fts3e.test z:/private/10285A82/fts3e.test
+../TEST/TclScript/fts3near.test z:/private/10285A82/fts3near.test
+../TEST/TclScript/func.test z:/private/10285A82/func.test
+../TEST/TclScript/fuzz.test z:/private/10285A82/fuzz.test
+../TEST/TclScript/fuzz2.test z:/private/10285A82/fuzz2.test
+../TEST/TclScript/fuzz_malloc.test z:/private/10285A82/fuzz_malloc.test
+../TEST/TclScript/hook.test z:/private/10285A82/hook.test
+../TEST/TclScript/icu.test z:/private/10285A82/icu.test
+../TEST/TclScript/in.test z:/private/10285A82/in.test
+../TEST/TclScript/in2.test z:/private/10285A82/in2.test
+../TEST/TclScript/in3.test z:/private/10285A82/in3.test
+../TEST/TclScript/incrblob.test z:/private/10285A82/incrblob.test
+../TEST/TclScript/incrblob2.test z:/private/10285A82/incrblob2.test
+../TEST/TclScript/incrblob_err.test z:/private/10285A82/incrblob_err.test
+../TEST/TclScript/incrvacuum.test z:/private/10285A82/incrvacuum.test
+../TEST/TclScript/incrvacuum2.test z:/private/10285A82/incrvacuum2.test
+../TEST/TclScript/incrvacuum_ioerr.test z:/private/10285A82/incrvacuum_ioerr.test
+../TEST/TclScript/index.test z:/private/10285A82/index.test
+../TEST/TclScript/index2.test z:/private/10285A82/index2.test
+../TEST/TclScript/index3.test z:/private/10285A82/index3.test
+../TEST/TclScript/insert.test z:/private/10285A82/insert.test
+../TEST/TclScript/insert2.test z:/private/10285A82/insert2.test
+../TEST/TclScript/insert3.test z:/private/10285A82/insert3.test
+../TEST/TclScript/insert4.test z:/private/10285A82/insert4.test
+../TEST/TclScript/insert5.test z:/private/10285A82/insert5.test
+../TEST/TclScript/interrupt.test z:/private/10285A82/interrupt.test
+../TEST/TclScript/intpkey.test z:/private/10285A82/intpkey.test
+../TEST/TclScript/io.test z:/private/10285A82/io.test
+../TEST/TclScript/ioerr.test z:/private/10285A82/ioerr.test
+../TEST/TclScript/ioerr2.test z:/private/10285A82/ioerr2.test
+../TEST/TclScript/ioerr3.test z:/private/10285A82/ioerr3.test
+../TEST/TclScript/ioerr4.test z:/private/10285A82/ioerr4.test
+../TEST/TclScript/ioerr5.test z:/private/10285A82/ioerr5.test
+../TEST/TclScript/join.test z:/private/10285A82/join.test
+../TEST/TclScript/join2.test z:/private/10285A82/join2.test
+../TEST/TclScript/join3.test z:/private/10285A82/join3.test
+../TEST/TclScript/join4.test z:/private/10285A82/join4.test
+../TEST/TclScript/join5.test z:/private/10285A82/join5.test
+../TEST/TclScript/journal1.test z:/private/10285A82/journal1.test
+../TEST/TclScript/jrnlmode.test z:/private/10285A82/jrnlmode.test
+../TEST/TclScript/lastinsert.test z:/private/10285A82/lastinsert.test
+../TEST/TclScript/laststmtchanges.test z:/private/10285A82/laststmtchanges.test
+../TEST/TclScript/like.test z:/private/10285A82/like.test
+../TEST/TclScript/like2.test z:/private/10285A82/like2.test
+../TEST/TclScript/limit.test z:/private/10285A82/limit.test
+../TEST/TclScript/loadext.test z:/private/10285A82/loadext.test
+../TEST/TclScript/loadext2.test z:/private/10285A82/loadext2.test
+../TEST/TclScript/lock.test z:/private/10285A82/lock.test
+../TEST/TclScript/lock2.test z:/private/10285A82/lock2.test
+../TEST/TclScript/lock3.test z:/private/10285A82/lock3.test
+../TEST/TclScript/lock4.test z:/private/10285A82/lock4.test
+../TEST/TclScript/lock5.test z:/private/10285A82/lock5.test
+../TEST/TclScript/lookaside.test z:/private/10285A82/lookaside.test
+../TEST/TclScript/main.test z:/private/10285A82/main.test
+../TEST/TclScript/malloc.test z:/private/10285A82/malloc.test
+../TEST/TclScript/malloc3.test z:/private/10285A82/malloc3.test
+../TEST/TclScript/malloc4.test z:/private/10285A82/malloc4.test
+../TEST/TclScript/malloc5.test z:/private/10285A82/malloc5.test
+../TEST/TclScript/malloc6.test z:/private/10285A82/malloc6.test
+../TEST/TclScript/malloc7.test z:/private/10285A82/malloc7.test
+../TEST/TclScript/malloc8.test z:/private/10285A82/malloc8.test
+../TEST/TclScript/malloc9.test z:/private/10285A82/malloc9.test
+../TEST/TclScript/mallocA.test z:/private/10285A82/mallocA.test
+../TEST/TclScript/mallocAll.test z:/private/10285A82/mallocAll.test
+../TEST/TclScript/mallocB.test z:/private/10285A82/mallocB.test
+../TEST/TclScript/mallocC.test z:/private/10285A82/mallocC.test
+../TEST/TclScript/mallocD.test z:/private/10285A82/mallocD.test
+../TEST/TclScript/mallocE.test z:/private/10285A82/mallocE.test
+../TEST/TclScript/mallocF.test z:/private/10285A82/mallocF.test
+../TEST/TclScript/mallocG.test z:/private/10285A82/mallocG.test
+../TEST/TclScript/mallocH.test z:/private/10285A82/mallocH.test
+../TEST/TclScript/mallocI.test z:/private/10285A82/mallocI.test
+../TEST/TclScript/manydb.test z:/private/10285A82/manydb.test
+../TEST/TclScript/memdb.test z:/private/10285A82/memdb.test
+../TEST/TclScript/memleak.test z:/private/10285A82/memleak.test
+../TEST/TclScript/memsubsys1.test z:/private/10285A82/memsubsys1.test
+../TEST/TclScript/memsubsys2.test z:/private/10285A82/memsubsys2.test
+../TEST/TclScript/minmax.test z:/private/10285A82/minmax.test
+../TEST/TclScript/minmax2.test z:/private/10285A82/minmax2.test
+../TEST/TclScript/minmax3.test z:/private/10285A82/minmax3.test
+../TEST/TclScript/misc1.test z:/private/10285A82/misc1.test
+../TEST/TclScript/misc2.test z:/private/10285A82/misc2.test
+../TEST/TclScript/misc3.test z:/private/10285A82/misc3.test
+../TEST/TclScript/misc4.test z:/private/10285A82/misc4.test
+../TEST/TclScript/misc5.test z:/private/10285A82/misc5.test
+../TEST/TclScript/misc6.test z:/private/10285A82/misc6.test
+../TEST/TclScript/misc7.test z:/private/10285A82/misc7.test
+../TEST/TclScript/misuse.test z:/private/10285A82/misuse.test
+../TEST/TclScript/mutex1.test z:/private/10285A82/mutex1.test
+../TEST/TclScript/mutex2.test z:/private/10285A82/mutex2.test
+../TEST/TclScript/nan.test z:/private/10285A82/nan.test
+../TEST/TclScript/notnull.test z:/private/10285A82/notnull.test
+../TEST/TclScript/null.test z:/private/10285A82/null.test
+../TEST/TclScript/openv2.test z:/private/10285A82/openv2.test
+../TEST/TclScript/pager.test z:/private/10285A82/pager.test
+../TEST/TclScript/pager2.test z:/private/10285A82/pager2.test
+../TEST/TclScript/pager3.test z:/private/10285A82/pager3.test
+../TEST/TclScript/pageropt.test z:/private/10285A82/pageropt.test
+../TEST/TclScript/pagesize.test z:/private/10285A82/pagesize.test
+../TEST/TclScript/pcache.test z:/private/10285A82/pcache.test
+../TEST/TclScript/permutations.test z:/private/10285A82/permutations.test
+../TEST/TclScript/pragma.test z:/private/10285A82/pragma.test
+../TEST/TclScript/pragma2.test z:/private/10285A82/pragma2.test
+../TEST/TclScript/printf.test z:/private/10285A82/printf.test
+../TEST/TclScript/progress.test z:/private/10285A82/progress.test
+../TEST/TclScript/ptrchng.test z:/private/10285A82/ptrchng.test
+../TEST/TclScript/quick.test z:/private/10285A82/quick.test
+../TEST/TclScript/quote.test z:/private/10285A82/quote.test
+../TEST/TclScript/rdonly.test z:/private/10285A82/rdonly.test
+../TEST/TclScript/reindex.test z:/private/10285A82/reindex.test
+../TEST/TclScript/rollback.test z:/private/10285A82/rollback.test
+../TEST/TclScript/rowid.test z:/private/10285A82/rowid.test
+../TEST/TclScript/rtree.test z:/private/10285A82/rtree.test
+../TEST/TclScript/safety.test z:/private/10285A82/safety.test
+../TEST/TclScript/schema.test z:/private/10285A82/schema.test
+../TEST/TclScript/schema2.test z:/private/10285A82/schema2.test
+../TEST/TclScript/select1.test z:/private/10285A82/select1.test
+../TEST/TclScript/select2.test z:/private/10285A82/select2.test
+../TEST/TclScript/select3.test z:/private/10285A82/select3.test
+../TEST/TclScript/select4.test z:/private/10285A82/select4.test
+../TEST/TclScript/select5.test z:/private/10285A82/select5.test
+../TEST/TclScript/select6.test z:/private/10285A82/select6.test
+../TEST/TclScript/select7.test z:/private/10285A82/select7.test
+../TEST/TclScript/select8.test z:/private/10285A82/select8.test
+../TEST/TclScript/select9.test z:/private/10285A82/select9.test
+../TEST/TclScript/selectA.test z:/private/10285A82/selectA.test
+../TEST/TclScript/selectB.test z:/private/10285A82/selectB.test
+../TEST/TclScript/server1.test z:/private/10285A82/server1.test
+../TEST/TclScript/shared.test z:/private/10285A82/shared.test
+../TEST/TclScript/shared2.test z:/private/10285A82/shared2.test
+../TEST/TclScript/shared3.test z:/private/10285A82/shared3.test
+../TEST/TclScript/shared4.test z:/private/10285A82/shared4.test
+../TEST/TclScript/shared_err.test z:/private/10285A82/shared_err.test
+../TEST/TclScript/shortread1.test z:/private/10285A82/shortread1.test
+../TEST/TclScript/sidedelete.test z:/private/10285A82/sidedelete.test
+../TEST/TclScript/soak.test z:/private/10285A82/soak.test
+../TEST/TclScript/softheap1.test z:/private/10285A82/softheap1.test
+../TEST/TclScript/sort.test z:/private/10285A82/sort.test
+../TEST/TclScript/speed1.test z:/private/10285A82/speed1.test
+../TEST/TclScript/speed1p.test z:/private/10285A82/speed1p.test
+../TEST/TclScript/speed2.test z:/private/10285A82/speed2.test
+../TEST/TclScript/speed3.test z:/private/10285A82/speed3.test
+../TEST/TclScript/speed4.test z:/private/10285A82/speed4.test
+../TEST/TclScript/speed4p.test z:/private/10285A82/speed4p.test
+../TEST/TclScript/sqllimits1.test z:/private/10285A82/sqllimits1.test
+../TEST/TclScript/subquery.test z:/private/10285A82/subquery.test
+../TEST/TclScript/subselect.test z:/private/10285A82/subselect.test
+../TEST/TclScript/substr.test z:/private/10285A82/substr.test
+../TEST/TclScript/sync.test z:/private/10285A82/sync.test
+../TEST/TclScript/table.test z:/private/10285A82/table.test
+../TEST/TclScript/tableapi.test z:/private/10285A82/tableapi.test
+../TEST/TclScript/tclsqlite.test z:/private/10285A82/tclsqlite.test
+../TEST/TclScript/tempdb.test z:/private/10285A82/tempdb.test
+../TEST/TclScript/temptable.test z:/private/10285A82/temptable.test
+../TEST/TclScript/thread001.test z:/private/10285A82/thread001.test
+../TEST/TclScript/thread002.test z:/private/10285A82/thread002.test
+../TEST/TclScript/thread003.test z:/private/10285A82/thread003.test
+../TEST/TclScript/thread1.test z:/private/10285A82/thread1.test
+../TEST/TclScript/thread2.test z:/private/10285A82/thread2.test
+../TEST/TclScript/tkt1435.test z:/private/10285A82/tkt1435.test
+../TEST/TclScript/tkt1443.test z:/private/10285A82/tkt1443.test
+../TEST/TclScript/tkt1444.test z:/private/10285A82/tkt1444.test
+../TEST/TclScript/tkt1449.test z:/private/10285A82/tkt1449.test
+../TEST/TclScript/tkt1473.test z:/private/10285A82/tkt1473.test
+../TEST/TclScript/tkt1501.test z:/private/10285A82/tkt1501.test
+../TEST/TclScript/tkt1512.test z:/private/10285A82/tkt1512.test
+../TEST/TclScript/tkt1514.test z:/private/10285A82/tkt1514.test
+../TEST/TclScript/tkt1536.test z:/private/10285A82/tkt1536.test
+../TEST/TclScript/tkt1537.test z:/private/10285A82/tkt1537.test
+../TEST/TclScript/tkt1567.test z:/private/10285A82/tkt1567.test
+../TEST/TclScript/tkt1644.test z:/private/10285A82/tkt1644.test
+../TEST/TclScript/tkt1667.test z:/private/10285A82/tkt1667.test
+../TEST/TclScript/tkt1873.test z:/private/10285A82/tkt1873.test
+../TEST/TclScript/tkt2141.test z:/private/10285A82/tkt2141.test
+../TEST/TclScript/tkt2192.test z:/private/10285A82/tkt2192.test
+../TEST/TclScript/tkt2213.test z:/private/10285A82/tkt2213.test
+../TEST/TclScript/tkt2251.test z:/private/10285A82/tkt2251.test
+../TEST/TclScript/tkt2285.test z:/private/10285A82/tkt2285.test
+../TEST/TclScript/tkt2332.test z:/private/10285A82/tkt2332.test
+../TEST/TclScript/tkt2339.test z:/private/10285A82/tkt2339.test
+../TEST/TclScript/tkt2391.test z:/private/10285A82/tkt2391.test
+../TEST/TclScript/tkt2409.test z:/private/10285A82/tkt2409.test
+../TEST/TclScript/tkt2450.test z:/private/10285A82/tkt2450.test
+../TEST/TclScript/tkt2640.test z:/private/10285A82/tkt2640.test
+../TEST/TclScript/tkt2643.test z:/private/10285A82/tkt2643.test
+../TEST/TclScript/tkt2686.test z:/private/10285A82/tkt2686.test
+../TEST/TclScript/tkt2767.test z:/private/10285A82/tkt2767.test
+../TEST/TclScript/tkt2817.test z:/private/10285A82/tkt2817.test
+../TEST/TclScript/tkt2820.test z:/private/10285A82/tkt2820.test
+../TEST/TclScript/tkt2822.test z:/private/10285A82/tkt2822.test
+../TEST/TclScript/tkt2832.test z:/private/10285A82/tkt2832.test
+../TEST/TclScript/tkt2854.test z:/private/10285A82/tkt2854.test
+../TEST/TclScript/tkt2920.test z:/private/10285A82/tkt2920.test
+../TEST/TclScript/tkt2927.test z:/private/10285A82/tkt2927.test
+../TEST/TclScript/tkt2942.test z:/private/10285A82/tkt2942.test
+../TEST/TclScript/tkt3080.test z:/private/10285A82/tkt3080.test
+../TEST/TclScript/tkt3093.test z:/private/10285A82/tkt3093.test
+../TEST/TclScript/tkt3121.test z:/private/10285A82/tkt3121.test
+../TEST/TclScript/tkt3201.test z:/private/10285A82/tkt3201.test
+../TEST/TclScript/tkt3292.test z:/private/10285A82/tkt3292.test
+../TEST/TclScript/tkt3298.test z:/private/10285A82/tkt3298.test
+../TEST/TclScript/tkt3334.test z:/private/10285A82/tkt3334.test
+../TEST/TclScript/tokenize.test z:/private/10285A82/tokenize.test
+../TEST/TclScript/trace.test z:/private/10285A82/trace.test
+../TEST/TclScript/trans.test z:/private/10285A82/trans.test
+../TEST/TclScript/trans2.test z:/private/10285A82/trans2.test
+../TEST/TclScript/trigger1.test z:/private/10285A82/trigger1.test
+../TEST/TclScript/trigger2.test z:/private/10285A82/trigger2.test
+../TEST/TclScript/trigger3.test z:/private/10285A82/trigger3.test
+../TEST/TclScript/trigger4.test z:/private/10285A82/trigger4.test
+../TEST/TclScript/trigger5.test z:/private/10285A82/trigger5.test
+../TEST/TclScript/trigger6.test z:/private/10285A82/trigger6.test
+../TEST/TclScript/trigger7.test z:/private/10285A82/trigger7.test
+../TEST/TclScript/trigger8.test z:/private/10285A82/trigger8.test
+../TEST/TclScript/trigger9.test z:/private/10285A82/trigger9.test
+../TEST/TclScript/triggerA.test z:/private/10285A82/triggerA.test
+../TEST/TclScript/triggerB.test z:/private/10285A82/triggerB.test
+../TEST/TclScript/types.test z:/private/10285A82/types.test
+../TEST/TclScript/types2.test z:/private/10285A82/types2.test
+../TEST/TclScript/types3.test z:/private/10285A82/types3.test
+../TEST/TclScript/unique.test z:/private/10285A82/unique.test
+../TEST/TclScript/update.test z:/private/10285A82/update.test
+../TEST/TclScript/utf16align.test z:/private/10285A82/utf16align.test
+../TEST/TclScript/vacuum.test z:/private/10285A82/vacuum.test
+../TEST/TclScript/vacuum2.test z:/private/10285A82/vacuum2.test
+../TEST/TclScript/vacuum3.test z:/private/10285A82/vacuum3.test
+../TEST/TclScript/varint.test z:/private/10285A82/varint.test
+../TEST/TclScript/veryquick.test z:/private/10285A82/veryquick.test
+../TEST/TclScript/view.test z:/private/10285A82/view.test
+../TEST/TclScript/vtab1.test z:/private/10285A82/vtab1.test
+../TEST/TclScript/vtab2.test z:/private/10285A82/vtab2.test
+../TEST/TclScript/vtab3.test z:/private/10285A82/vtab3.test
+../TEST/TclScript/vtab4.test z:/private/10285A82/vtab4.test
+../TEST/TclScript/vtab5.test z:/private/10285A82/vtab5.test
+../TEST/TclScript/vtab6.test z:/private/10285A82/vtab6.test
+../TEST/TclScript/vtab7.test z:/private/10285A82/vtab7.test
+../TEST/TclScript/vtab8.test z:/private/10285A82/vtab8.test
+../TEST/TclScript/vtab9.test z:/private/10285A82/vtab9.test
+../TEST/TclScript/vtabA.test z:/private/10285A82/vtabA.test
+../TEST/TclScript/vtabB.test z:/private/10285A82/vtabB.test
+../TEST/TclScript/vtabC.test z:/private/10285A82/vtabC.test
+../TEST/TclScript/vtab_alter.test z:/private/10285A82/vtab_alter.test
+../TEST/TclScript/vtab_err.test z:/private/10285A82/vtab_err.test
+../TEST/TclScript/vtab_shared.test z:/private/10285A82/vtab_shared.test
+../TEST/TclScript/where.test z:/private/10285A82/where.test
+../TEST/TclScript/where2.test z:/private/10285A82/where2.test
+../TEST/TclScript/where3.test z:/private/10285A82/where3.test
+../TEST/TclScript/where4.test z:/private/10285A82/where4.test
+../TEST/TclScript/where5.test z:/private/10285A82/where5.test
+../TEST/TclScript/where6.test z:/private/10285A82/where6.test
+../TEST/TclScript/zeroblob.test z:/private/10285A82/zeroblob.test
--- a/persistentstorage/store/TSTOR/T_BMStreams.inl Fri May 14 17:36:33 2010 +0300
+++ b/persistentstorage/store/TSTOR/T_BMStreams.inl Thu May 27 14:29:47 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -25,7 +25,7 @@
// Internalize CCompound object from the stream
LOCAL_C void doInternalizeL(const TDesC& aName);
-#define STREAMRUNSIZE 1000
+#define STREAMRUNSIZE 500
// Declare a class used by the example
class CStreamA
{