os/persistentdata/persistentstorage/sql/TEST/testexecute/SQLite/config/Concurrent.ini
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/persistentdata/persistentstorage/sql/TEST/testexecute/SQLite/config/Concurrent.ini Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,302 @@
1.4 +
1.5 +// Concurrency tests. Threads[2-8] wait (semaphore) until they receive a
1.6 +// signal. Thread1 creates the db and adds a table to it. It then signals the
1.7 +// other threads and all eight threads write integer, real, and text data
1.8 +// to the table.
1.9 +[Thread1]
1.10 +WaitB0=7
1.11 +Delete1=C:\Concurrent.db
1.12 +ExpectedError1=KErrNotFound
1.13 +Create2=C:\Concurrent.db
1.14 +Exec3=Create Table Con( Someint int primary key, Somereal real, Sometext text);
1.15 +Prepare4=insert into Con(Someint, Somereal, Sometext) values(:FInt, :FReal, :FText);
1.16 +// Wake up the other threads, we're doing the next bit concurrently.
1.17 +SignalA5=7
1.18 +
1.19 +Function6=WriteBigTable
1.20 +EventuallyExpectedError=KErrNone
1.21 +LowCount=0
1.22 +HighCount=64
1.23 +CountStep=8
1.24 +Multiplier=2.81
1.25 +Text=Thread1
1.26 +St_Close7=
1.27 +Close8=
1.28 +WaitB9=7
1.29 +EndBlock10=
1.30 +
1.31 +[Thread2]
1.32 +SignalB0=1
1.33 +WaitA1=1
1.34 +Open2=C:\Concurrent.db
1.35 +Prepare3=insert into Con(Someint, Somereal, Sometext) values(:FInt, :FReal, :FText);
1.36 +Function4=WriteBigTable
1.37 +EventuallyExpectedError=KErrNone
1.38 +LowCount=1
1.39 +HighCount=65
1.40 +CountStep=8
1.41 +Multiplier=-1.121
1.42 +Text=Thread2
1.43 +St_Close5=
1.44 +Close6=
1.45 +SignalB7=1
1.46 +EndBlock8=
1.47 +
1.48 +[Thread3]
1.49 +SignalB0=1
1.50 +WaitA1=1
1.51 +Open2=C:\Concurrent.db
1.52 +Prepare3=insert into Con(Someint, Somereal, Sometext) values(:FInt, :FReal, :FText);
1.53 +Function4=WriteBigTable
1.54 +EventuallyExpectedError=KErrNone
1.55 +LowCount=2
1.56 +HighCount=66
1.57 +CountStep=8
1.58 +Multiplier=4.8e-21
1.59 +Text=Thread3
1.60 +St_Close5=
1.61 +Close6=
1.62 +SignalB7=1
1.63 +EndBlock8=
1.64 +
1.65 +[Thread4]
1.66 +SignalB0=1
1.67 +WaitA1=1
1.68 +Open2=C:\Concurrent.db
1.69 +Prepare3=insert into Con(Someint, Somereal, Sometext) values(:FInt, :FReal, :FText);
1.70 +Function4=WriteBigTable
1.71 +EventuallyExpectedError=KErrNone
1.72 +LowCount=3
1.73 +HighCount=67
1.74 +CountStep=8
1.75 +Multiplier=3.141592654
1.76 +Text=Thread4
1.77 +St_Close5=
1.78 +Close6=
1.79 +SignalB7=1
1.80 +EndBlock8=
1.81 +
1.82 +[Thread5]
1.83 +SignalB0=1
1.84 +WaitA1=1
1.85 +Open2=C:\Concurrent.db
1.86 +Prepare3=insert into Con(Someint, Somereal, Sometext) values(:FInt, :FReal, :FText);
1.87 +Function4=WriteBigTable
1.88 +EventuallyExpectedError=KErrNone
1.89 +LowCount=4
1.90 +HighCount=68
1.91 +CountStep=8
1.92 +Multiplier=2.81
1.93 +Text=Thread5
1.94 +St_Close5=
1.95 +Close6=
1.96 +SignalB7=1
1.97 +EndBlock8=
1.98 +
1.99 +[Thread6]
1.100 +SignalB0=1
1.101 +WaitA1=1
1.102 +Open2=C:\Concurrent.db
1.103 +Prepare3=insert into Con(Someint, Somereal, Sometext) values(:FInt, :FReal, :FText);
1.104 +Function4=WriteBigTable
1.105 +EventuallyExpectedError=KErrNone
1.106 +LowCount=5
1.107 +HighCount=69
1.108 +CountStep=8
1.109 +Multiplier=-1.121
1.110 +Text=Thread6
1.111 +St_Close5=
1.112 +Close6=
1.113 +SignalB7=1
1.114 +EndBlock8=
1.115 +
1.116 +[Thread7]
1.117 +SignalB0=1
1.118 +WaitA1=1
1.119 +Open2=C:\Concurrent.db
1.120 +Prepare3=insert into Con(Someint, Somereal, Sometext) values(:FInt, :FReal, :FText);
1.121 +Function4=WriteBigTable
1.122 +EventuallyExpectedError=KErrNone
1.123 +LowCount=6
1.124 +HighCount=70
1.125 +CountStep=8
1.126 +Multiplier=4.8e-21
1.127 +Text=Thread7
1.128 +St_Close5=
1.129 +Close6=
1.130 +SignalB7=1
1.131 +EndBlock8=
1.132 +
1.133 +[Thread8]
1.134 +SignalB0=1
1.135 +WaitA1=1
1.136 +Open2=C:\Concurrent.db
1.137 +Prepare3=insert into Con(Someint, Somereal, Sometext) values(:FInt, :FReal, :FText);
1.138 +Function4=WriteBigTable
1.139 +EventuallyExpectedError=KErrNone
1.140 +LowCount=7
1.141 +HighCount=71
1.142 +CountStep=8
1.143 +Multiplier=3.141592654
1.144 +Text=Thread8
1.145 +St_Close5=
1.146 +Close6=
1.147 +SignalB7=1
1.148 +EndBlock8=
1.149 +
1.150 +// The following 8 blocks check the content written by the threads above.
1.151 +// These are entirely independent of each other and therefore do not require
1.152 +// use of the semaphores.
1.153 +
1.154 +[Check1]
1.155 +Open0=C:\Concurrent.db
1.156 +Prepare1=select * from Con where(Sometext="Thread1");
1.157 +Next2=KSqlAtRow
1.158 +ExpectedError2=KSqlAtRow
1.159 +NoOperation3=
1.160 +
1.161 +Function4=ReadBigTable
1.162 +EventuallyExpectedError=KErrNone
1.163 +LowCount=0
1.164 +HighCount=64
1.165 +CountStep=8
1.166 +Multiplier=2.81
1.167 +Text=Thread1
1.168 +AtRow5=False
1.169 +St_Close6=
1.170 +Close7=
1.171 +EndBlock8=
1.172 +
1.173 +[Check2]
1.174 +Open0=C:\Concurrent.db
1.175 +Prepare1=select * from Con where(Sometext="Thread2");
1.176 +Next2=KSqlAtRow
1.177 +ExpectedError2=KSqlAtRow
1.178 +NoOperation3=
1.179 +
1.180 +Function4=ReadBigTable
1.181 +EventuallyExpectedError=KErrNone
1.182 +LowCount=1
1.183 +HighCount=65
1.184 +CountStep=8
1.185 +Multiplier=-1.121
1.186 +Text=Thread2
1.187 +AtRow5=False
1.188 +St_Close6=
1.189 +Close7=
1.190 +EndBlock8=
1.191 +
1.192 +[Check3]
1.193 +Open0=C:\Concurrent.db
1.194 +Prepare1=select * from Con where(Sometext="Thread3");
1.195 +Next2=KSqlAtRow
1.196 +ExpectedError2=KSqlAtRow
1.197 +NoOperation3=
1.198 +
1.199 +Function4=ReadBigTable
1.200 +EventuallyExpectedError=KErrNone
1.201 +LowCount=2
1.202 +HighCount=66
1.203 +CountStep=8
1.204 +Multiplier=4.8e-21
1.205 +Text=Thread3
1.206 +AtRow5=False
1.207 +St_Close6=
1.208 +Close7=
1.209 +EndBlock8=
1.210 +
1.211 +[Check4]
1.212 +Open0=C:\Concurrent.db
1.213 +Prepare1=select * from Con where(Sometext="Thread4");
1.214 +Next2=KSqlAtRow
1.215 +ExpectedError2=KSqlAtRow
1.216 +NoOperation3=
1.217 +
1.218 +Function4=ReadBigTable
1.219 +EventuallyExpectedError=KErrNone
1.220 +LowCount=3
1.221 +HighCount=67
1.222 +CountStep=8
1.223 +Multiplier=3.141592654
1.224 +Text=Thread4
1.225 +AtRow5=False
1.226 +St_Close6=
1.227 +Close7=
1.228 +EndBlock8=
1.229 +
1.230 +[Check5]
1.231 +Open0=C:\Concurrent.db
1.232 +Prepare1=select * from Con where(Sometext="Thread5");
1.233 +Next2=KSqlAtRow
1.234 +ExpectedError2=KSqlAtRow
1.235 +NoOperation3=
1.236 +
1.237 +Function4=ReadBigTable
1.238 +EventuallyExpectedError=KErrNone
1.239 +LowCount=4
1.240 +HighCount=68
1.241 +CountStep=8
1.242 +Multiplier=2.81
1.243 +Text=Thread5
1.244 +AtRow5=False
1.245 +St_Close6=
1.246 +Close7=
1.247 +EndBlock8=
1.248 +
1.249 +[Check6]
1.250 +Open0=C:\Concurrent.db
1.251 +Prepare1=select * from Con where(Sometext="Thread6");
1.252 +Next2=KSqlAtRow
1.253 +ExpectedError2=KSqlAtRow
1.254 +NoOperation3=
1.255 +
1.256 +Function4=ReadBigTable
1.257 +EventuallyExpectedError=KErrNone
1.258 +LowCount=5
1.259 +HighCount=69
1.260 +CountStep=8
1.261 +Multiplier=-1.121
1.262 +Text=Thread6
1.263 +AtRow5=False
1.264 +St_Close6=
1.265 +Close7=
1.266 +EndBlock8=
1.267 +
1.268 +[Check7]
1.269 +Open0=C:\Concurrent.db
1.270 +Prepare1=select * from Con where(Sometext="Thread7");
1.271 +Next2=KSqlAtRow
1.272 +ExpectedError2=KSqlAtRow
1.273 +NoOperation3=
1.274 +
1.275 +Function4=ReadBigTable
1.276 +EventuallyExpectedError=KErrNone
1.277 +LowCount=6
1.278 +HighCount=70
1.279 +CountStep=8
1.280 +Multiplier=4.8e-21
1.281 +Text=Thread7
1.282 +AtRow5=False
1.283 +St_Close6=
1.284 +Close7=
1.285 +EndBlock8=
1.286 +
1.287 +[Check8]
1.288 +Open0=C:\Concurrent.db
1.289 +Prepare1=select * from Con where(Sometext="Thread8");
1.290 +Next2=KSqlAtRow
1.291 +ExpectedError2=KSqlAtRow
1.292 +NoOperation3=
1.293 +
1.294 +Function4=ReadBigTable
1.295 +EventuallyExpectedError=KErrNone
1.296 +LowCount=7
1.297 +HighCount=71
1.298 +CountStep=8
1.299 +Multiplier=3.141592654
1.300 +Text=Thread8
1.301 +AtRow5=False
1.302 +St_Close6=
1.303 +Close7=
1.304 +EndBlock8=
1.305 +