os/persistentdata/persistentstorage/sql/TEST/testexecute/SQLite/scripts/security.script
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/persistentdata/persistentstorage/sql/TEST/testexecute/SQLite/scripts/security.script	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,225 @@
     1.4 +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// @file
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +//! @SYMTestSuiteName PDS-TEF-SQL-SUITE
    1.22 +//! @SYMScriptTestEnvironment TEF
    1.23 +//! @internalComponent
    1.24 +//! @test
    1.25 +
    1.26 +PRINT Run SQL Tests
    1.27 +
    1.28 +LOAD_SUITE te_SQL_Suite
    1.29 +LOAD_SUITE te_SQL_Suite_cap1
    1.30 +LOAD_SUITE te_SQL_Suite_cap2
    1.31 +
    1.32 +RUN_UTILS MkDir c:\private\
    1.33 +RUN_UTILS MkDir c:\private\102827c7\
    1.34 +RUN_UTILS MkDir c:\private\102827c8\
    1.35 +RUN_UTILS MkDir c:\private\10281e17\
    1.36 +
    1.37 +RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]sec.db
    1.38 +RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]sec1.db
    1.39 +RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]sec2.db
    1.40 +RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]sec4.db
    1.41 +RUN_UTILS DeleteFile c:\private\10281e17\[102827c8]sec.db
    1.42 +RUN_UTILS DeleteFile c:\private\102827c7\sec.db
    1.43 +RUN_UTILS DeleteFile c:\private\102827c8\sec.db
    1.44 +RUN_UTILS DeleteFile c:\private\102827c8\sec3.db
    1.45 +RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]sec_copy.db
    1.46 +RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]secpol.db
    1.47 +
    1.48 +
    1.49 +START_TESTCASE SYSLIB-SQL-CIT-1839
    1.50 +//! @SYMTestCaseID    SYSLIB-SQL-CIT-1839
    1.51 +//! @SYMTestCaseDesc  PlatSec tests creating databases
    1.52 +//! @SYMTestPriority  High
    1.53 +//! @SYMTestActions   See description and the config file.
    1.54 +//! @SYMTestExpectedResults
    1.55 +//!                  The test looks for errors and content
    1.56 +//!                  within the database. If these are not seen test errors
    1.57 +//!                  will be generated.
    1.58 +//!                  
    1.59 +//! @SYMREQ           REQ5794
    1.60 +
    1.61 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini create1
    1.62 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini create1a
    1.63 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini create1b
    1.64 +	RUN_TEST_STEP 100 te_SQL_Suite_cap1 CSQLDDT z:\TEF_SQL\security.ini create2
    1.65 +	RUN_TEST_STEP 100 te_SQL_Suite_cap1 CSQLDDT z:\TEF_SQL\security.ini create3
    1.66 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini create4
    1.67 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini create5
    1.68 +	RUN_PANIC_STEP_RESULT 2 SqlDb 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini create6
    1.69 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini create7
    1.70 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini create8
    1.71 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini create9
    1.72 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini create10
    1.73 +	RUN_TEST_STEP 100 te_SQL_Suite_cap2 CSQLDDT z:\TEF_SQL\security.ini create11
    1.74 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini create12
    1.75 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini create12a
    1.76 +	RUN_TEST_STEP 100 te_SQL_Suite_cap2 CSQLDDT z:\TEF_SQL\security.ini create12b
    1.77 +END_TESTCASE SYSLIB-SQL-CIT-1839
    1.78 +
    1.79 +START_TESTCASE SYSLIB-SQL-CIT-1840
    1.80 +//! @SYMTestCaseID    SYSLIB-SQL-CIT-1840
    1.81 +//! @SYMTestCaseDesc  PlatSec tests reading databases
    1.82 +//! @SYMTestPriority  High
    1.83 +//! @SYMTestActions   See description and the config file.
    1.84 +//! @SYMTestExpectedResults
    1.85 +//!                  The test looks for errors and content
    1.86 +//!                  within the database. If these are not seen test errors
    1.87 +//!                  will be generated.
    1.88 +//!                  
    1.89 +//! @SYMREQ           REQ5794
    1.90 +
    1.91 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini read1
    1.92 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini read2
    1.93 +	RUN_TEST_STEP 100 te_SQL_Suite_cap1 CSQLDDT z:\TEF_SQL\security.ini read3
    1.94 +	RUN_TEST_STEP 100 te_SQL_Suite_cap1 CSQLDDT z:\TEF_SQL\security.ini read4
    1.95 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini read4
    1.96 +END_TESTCASE SYSLIB-SQL-CIT-1840
    1.97 +
    1.98 +
    1.99 +START_TESTCASE SYSLIB-SQL-CIT-1841
   1.100 +//! @SYMTestCaseID    SYSLIB-SQL-CIT-1841
   1.101 +//! @SYMTestCaseDesc  PlatSec tests writing to databases
   1.102 +//! @SYMTestPriority  High
   1.103 +//! @SYMTestActions   See description and the config file.
   1.104 +//! @SYMTestExpectedResults
   1.105 +//!                  The test looks for errors and content
   1.106 +//!                  within the database. If these are not seen test errors
   1.107 +//!                  will be generated.
   1.108 +//!                  
   1.109 +//! @SYMREQ           REQ5794
   1.110 +	RUN_TEST_STEP 100 te_SQL_Suite_cap1 CSQLDDT z:\TEF_SQL\security.ini write1
   1.111 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini write2
   1.112 +END_TESTCASE SYSLIB-SQL-CIT-1841
   1.113 +
   1.114 +START_TESTCASE SYSLIB-SQL-CIT-1842
   1.115 +//! @SYMTestCaseID    SYSLIB-SQL-CIT-1842
   1.116 +//! @SYMTestCaseDesc  PlatSec tests changing the schema of databases
   1.117 +//! @SYMTestPriority  High
   1.118 +//! @SYMTestActions   See description and the config file.
   1.119 +//! @SYMTestExpectedResults
   1.120 +//!                  The test looks for errors and content
   1.121 +//!                  within the database. If these are not seen test errors
   1.122 +//!                  will be generated.
   1.123 +//!                  
   1.124 +//! @SYMREQ           REQ5794
   1.125 +
   1.126 +	RUN_TEST_STEP 100 te_SQL_Suite_cap1 CSQLDDT z:\TEF_SQL\security.ini schema1
   1.127 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini schema2
   1.128 +END_TESTCASE SYSLIB-SQL-CIT-1842
   1.129 +
   1.130 +START_TESTCASE SYSLIB-SQL-CIT-1843
   1.131 +//! @SYMTestCaseID    SYSLIB-SQL-CIT-1843
   1.132 +//! @SYMTestCaseDesc  PlatSec tests checking the enforcement of security during attach operations
   1.133 +//! @SYMTestPriority  High
   1.134 +//! @SYMTestActions   See description and the config file.
   1.135 +//! @SYMTestExpectedResults
   1.136 +//!                  The test looks for errors and content
   1.137 +//!                  within the database. If these are not seen test errors
   1.138 +//!                  will be generated.
   1.139 +//!                  
   1.140 +//! @SYMREQ           REQ5794
   1.141 +
   1.142 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini attach1
   1.143 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini attach2
   1.144 +	RUN_TEST_STEP -1 te_SQL_Suite_cap1 CSQLDDT z:\TEF_SQL\security.ini attach3
   1.145 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini attach4
   1.146 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini attach5
   1.147 +//	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini attach6
   1.148 +END_TESTCASE SYSLIB-SQL-CIT-1843
   1.149 +
   1.150 +START_TESTCASE SYSLIB-SQL-CIT-1844
   1.151 +//! @SYMTestCaseID    SYSLIB-SQL-CIT-1844
   1.152 +//! @SYMTestCaseDesc  PlatSec tests checking the DB Copy operations within the security constraints
   1.153 +//! @SYMTestPriority  High
   1.154 +//! @SYMTestActions   See description and the config file.
   1.155 +//! @SYMTestExpectedResults
   1.156 +//!                  The test looks for errors and content
   1.157 +//!                  within the database. If these are not seen test errors
   1.158 +//!                  will be generated.
   1.159 +//!                  
   1.160 +//! @SYMREQ           REQ5794
   1.161 +
   1.162 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini copy1
   1.163 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini copy2
   1.164 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini copy3
   1.165 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini copy4
   1.166 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini copy5
   1.167 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini copy6
   1.168 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini copy7
   1.169 +END_TESTCASE SYSLIB-SQL-CIT-1844
   1.170 +
   1.171 +START_TESTCASE SYSLIB-SQL-CIT-1845
   1.172 +//! @SYMTestCaseID    SYSLIB-SQL-CIT-1845
   1.173 +//! @SYMTestCaseDesc  PlatSec tests checking that the table level policy has no effect 
   1.174 +//!		     as it's not supported yet
   1.175 +//! @SYMTestPriority  High
   1.176 +//! @SYMTestActions   See description and the config file.
   1.177 +//! @SYMTestExpectedResults
   1.178 +//!                  The test looks for errors and content
   1.179 +//!                  within the database. If these are not seen test errors
   1.180 +//!                  will be generated.
   1.181 +//!                  
   1.182 +//! @SYMREQ           REQ5794
   1.183 +
   1.184 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLCDT z:\TEF_SQL\security.ini policy1
   1.185 +	RUN_TEST_STEP 100 te_SQL_Suite_cap1 CSQLCDT z:\TEF_SQL\security.ini policy2
   1.186 +END_TESTCASE SYSLIB-SQL-CIT-1845
   1.187 +
   1.188 +RUN_UTILS DeleteFile c:\ext.pol
   1.189 +
   1.190 +START_TESTCASE SYSLIB-SQL-CIT-1846
   1.191 +//! @SYMTestCaseID    SYSLIB-SQL-CIT-1846
   1.192 +//! @SYMTestCaseDesc  PlatSec tests for RSalSecurity::Externalize and Internalize methods
   1.193 +//! @SYMTestPriority  High
   1.194 +//! @SYMTestActions   See description and the config file.
   1.195 +//! @SYMTestExpectedResults
   1.196 +//!                  The test looks for errors and content
   1.197 +//!                  within the database. If these are not seen test errors
   1.198 +//!                  will be generated.
   1.199 +//!                  
   1.200 +//! @SYMREQ           REQ5794
   1.201 +
   1.202 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini External1
   1.203 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini External2
   1.204 +	RUN_TEST_STEP 100 te_SQL_Suite_cap1 CSQLDDT z:\TEF_SQL\security.ini External3
   1.205 +	RUN_UTILS MakeReadWrite c:\ext.pol
   1.206 +	RUN_UTILS DeleteFile c:\ext.pol
   1.207 +	RUN_UTILS CopyFile z:\TEF_SQL\TestData\ext.pol c:\ext.pol
   1.208 +	RUN_UTILS MakeReadWrite c:\ext.pol
   1.209 +	RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]ext.db
   1.210 +	RUN_PANIC_STEP_RESULT 4 SqlDb 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\security.ini External2
   1.211 +END_TESTCASE SYSLIB-SQL-CIT-1846
   1.212 +
   1.213 +RUN_UTILS DeleteFile c:\ext.pol
   1.214 +RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]sec.db
   1.215 +RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]sec1.db
   1.216 +RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]sec2.db
   1.217 +RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]sec4.db
   1.218 +RUN_UTILS DeleteFile c:\private\10281e17\[102827c8]sec.db
   1.219 +RUN_UTILS DeleteFile c:\private\102827c7\sec.db
   1.220 +RUN_UTILS DeleteFile c:\private\102827c8\sec.db
   1.221 +RUN_UTILS DeleteFile c:\private\102827c8\sec3.db
   1.222 +RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]sec_copy.db
   1.223 +RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]secpol.db
   1.224 +
   1.225 +//cleanup
   1.226 +RUN_UTILS DeleteDirectory c:\private\102827c7\
   1.227 +RUN_UTILS DeleteDirectory c:\private\102827c8\
   1.228 +