Expand the multi-process test cases to repeat each case 20 times and

to repeat tests using different journal modes.

FossilOrigin-Name: a2715b049a86555990abccc7aa363c524ddb9982
This commit is contained in:
drh 2015-03-11 14:34:38 +00:00
parent 94929646f1
commit cc285c5ab0
6 changed files with 53 additions and 18 deletions

View File

@ -540,11 +540,19 @@ mptester$(EXE): sqlite3.c $(TOP)/mptest/mptest.c
$(LTLINK) -o $@ -I. $(TOP)/mptest/mptest.c sqlite3.c \
$(TLIBS) -rpath "$(libdir)"
MPTEST1=./mptester$(EXE) mptest.db $(TOP)/mptest/crash01.test --repeat 20
MPTEST2=./mptester$(EXE) mptest.db $(TOP)/mptest/multiwrite01.test --repeat 20
mptest: mptester$(EXE)
rm -f mptest1.db
./mptester$(EXE) mptest1.db $(TOP)/mptest/crash01.test
rm -f mptest2.db
./mptester$(EXE) mptest2.db $(TOP)/mptest/multiwrite01.test
rm -f mptest.db
$(MPTEST1) --journalmode DELETE
$(MPTEST2) --journalmode WAL
$(MPTEST1) --journalmode WAL
$(MPTEST2) --journalmode PERSIST
$(MPTEST1) --journalmode PERSIST
$(MPTEST2) --journalmode TRUNCATE
$(MPTEST1) --journalmode TRUNCATE
$(MPTEST2) --journalmode DELETE
# This target creates a directory named "tsrc" and fills it with
# copies of all of the C source code and header files needed to

View File

@ -1,7 +1,7 @@
C Fix\san\sincrblob2\stest\scase\sso\sthat\sit\sworks\son\s32-bit\ssystems.
D 2015-03-10T15:34:47.080
C Expand\sthe\smulti-process\stest\scases\sto\srepeat\seach\scase\s20\stimes\sand\nto\srepeat\stests\susing\sdifferent\sjournal\smodes.
D 2015-03-11T14:34:38.239
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 2f643d6968dfc0b82d2e546a0525a39079f9e928
F Makefile.in 88a3e6261286db378fdffa1124cad11b3c05f5bb
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
F Makefile.msc 529e61cd9d29a3934758b4b3a0bb649b6c653481
F Makefile.vxworks e1b65dea203f054e71653415bd8f96dcaed47858
@ -158,10 +158,10 @@ F mkopcodeh.awk c6b3fa301db6ef7ac916b14c60868aeaec1337b5
F mkso.sh fd21c06b063bb16a5d25deea1752c2da6ac3ed83
F mptest/config01.test 3c6adcbc50b991866855f1977ff172eb6d901271
F mptest/config02.test 4415dfe36c48785f751e16e32c20b077c28ae504
F mptest/crash01.test cce8e306d8596d5a2e497e27112dae1f6e5e3538
F mptest/crash01.test 61e61469e257df0850df4293d7d4d6c2af301421
F mptest/crash02.subtest f4ef05adcd15d60e5d2bd654204f2c008b519df8
F mptest/mptest.c 24c5f72415df2eab7088ef8c9f99f163aed590c8
F mptest/multiwrite01.test 499ad0310da8dff8e8f98d2e272fc2a8aa741b2e
F mptest/mptest.c 0c0c82c1d9aea0b1a60ef9456a04c35ab1106622
F mptest/multiwrite01.test dab5c5f8f9534971efce679152c5146da265222d
F spec.template 86a4a43b99ebb3e75e6b9a735d5fd293a24e90ca
F sqlite.pc.in 42b7bf0d02e08b9e77734a47798d1a55a9e0716b
F sqlite3.1 fc7ad8990fc8409983309bb80de8c811a7506786
@ -1241,7 +1241,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
P fbae6bafd74d8da9c72be5f562a62f80b01cc846
R f19e7f30be378d3111028d8dd74f6a7d
P 8d0b11c96e15556dd65ced05708a832aef134e69
R 2327229d01e481a57e92de598065db5c
U drh
Z 0ddafeebdf23c7d95a3d79f2f7b9a23f
Z cd1fd5866edba6a7b1ae8e17fb546b84

View File

@ -1 +1 @@
8d0b11c96e15556dd65ced05708a832aef134e69
a2715b049a86555990abccc7aa363c524ddb9982

View File

@ -32,6 +32,7 @@
--end
--wait 1
--task 2
DROP TABLE IF EXISTS t2;
CREATE TABLE t2(a INTEGER PRIMARY KEY, b);
INSERT INTO t2 SELECT a, b FROM t1;
UPDATE t1 SET b='x'||a||'y';
@ -46,6 +47,7 @@
--match 29 28 27 26 25
--end
--task 3
DROP TABLE IF EXISTS t3;
CREATE TABLE t3(a INTEGER PRIMARY KEY, b);
INSERT INTO t3 SELECT a, b FROM t1;
UPDATE t1 SET b='x'||a||'y';
@ -60,6 +62,7 @@
--match 29 28 27 26 25
--end
--task 4
DROP TABLE IF EXISTS t4;
CREATE TABLE t4(a INTEGER PRIMARY KEY, b);
INSERT INTO t4 SELECT a, b FROM t1;
UPDATE t1 SET b='x'||a||'y';
@ -74,6 +77,7 @@
--match 29 28 27 26 25
--end
--task 5
DROP TABLE IF EXISTS t5;
CREATE TABLE t5(a INTEGER PRIMARY KEY, b);
INSERT INTO t5 SELECT a, b FROM t1;
UPDATE t1 SET b='x'||a||'y';

View File

@ -1262,6 +1262,9 @@ int main(int argc, char **argv){
int taskId;
const char *zTrace;
const char *zCOption;
const char *zJMode;
const char *zNRep;
int nRep = 1, iRep;
g.argv0 = argv[0];
g.iTrace = 1;
@ -1277,6 +1280,10 @@ int main(int argc, char **argv){
}
n = argc-2;
sqlite3_snprintf(sizeof(g.zName), g.zName, "%05d.mptest", GETPID());
zJMode = findOption(argv+2, &n, "journalmode", 1);
zNRep = findOption(argv+2, &n, "repeat", 1);
if( zNRep ) nRep = atoi(zNRep);
if( nRep<1 ) nRep = 1;
g.zVfs = findOption(argv+2, &n, "vfs", 1);
zClient = findOption(argv+2, &n, "client", 1);
g.zErrLog = findOption(argv+2, &n, "errlog", 1);
@ -1348,7 +1355,11 @@ int main(int argc, char **argv){
fatalError("missing script filename");
}
if( n>1 ) unrecognizedArguments(argv[0], n, argv+2);
if( zJMode ) runSql("PRAGMA journal_mode=%Q;", zJMode);
runSql(
"DROP TABLE IF EXISTS task;\n"
"DROP TABLE IF EXISTS counters;\n"
"DROP TABLE IF EXISTS client;\n"
"CREATE TABLE task(\n"
" id INTEGER PRIMARY KEY,\n"
" name TEXT,\n"
@ -1364,10 +1375,12 @@ int main(int argc, char **argv){
"CREATE TABLE client(id INTEGER PRIMARY KEY, wantHalt);\n"
);
zScript = readFile(argv[2]);
if( g.iTrace ) logMessage("begin script [%s]\n", argv[2]);
runScript(0, 0, zScript, argv[2]);
for(iRep=1; iRep<=nRep; iRep++){
if( g.iTrace ) logMessage("begin script [%s] cycle %d\n", argv[2], iRep);
runScript(0, 0, zScript, argv[2]);
if( g.iTrace ) logMessage("end script [%s] cycle %d\n", argv[2], iRep);
}
sqlite3_free(zScript);
if( g.iTrace ) logMessage("end script [%s]\n", argv[2]);
waitForClient(0, 2000, "during shutdown...\n");
trySql("UPDATE client SET wantHalt=1");
sqlite3_sleep(10);
@ -1391,7 +1404,7 @@ int main(int argc, char **argv){
}
sqlite3_finalize(pStmt);
}
sqlite3_close(g.db);
sqlite3_close(g.db);
maybeClose(g.pLog);
maybeClose(g.pErrLog);
if( iClient==0 ){

View File

@ -361,6 +361,8 @@ PRAGMA integrity_check(10);
WHERE t4.b GLOB 'x4?y' AND t3.b=('x'||(t4.a+5)||'y')
ORDER BY t3.a LIMIT 7
--match 45 46 47 48 49 50 51
PRAGMA integrity_check;
--match ok
--end
--task 5
SELECT t1.a FROM t1, t2
@ -371,6 +373,8 @@ PRAGMA integrity_check(10);
WHERE t4.b GLOB 'x4?y' AND t3.b=('x'||(t4.a+5)||'y')
ORDER BY t3.a LIMIT 7
--match 45 46 47 48 49 50 51
PRAGMA integrity_check;
--match ok
--end
--task 3
SELECT t1.a FROM t1, t2
@ -381,6 +385,8 @@ PRAGMA integrity_check(10);
WHERE t4.b GLOB 'x4?y' AND t3.b=('x'||(t4.a+5)||'y')
ORDER BY t3.a LIMIT 7
--match 45 46 47 48 49 50 51
PRAGMA integrity_check;
--match ok
--end
--task 2
SELECT t1.a FROM t1, t2
@ -391,6 +397,8 @@ PRAGMA integrity_check(10);
WHERE t4.b GLOB 'x4?y' AND t3.b=('x'||(t4.a+5)||'y')
ORDER BY t3.a LIMIT 7
--match 45 46 47 48 49 50 51
PRAGMA integrity_check;
--match ok
--end
--task 4
SELECT t1.a FROM t1, t2
@ -401,5 +409,7 @@ PRAGMA integrity_check(10);
WHERE t4.b GLOB 'x4?y' AND t3.b=('x'||(t4.a+5)||'y')
ORDER BY t3.a LIMIT 7
--match 45 46 47 48 49 50 51
PRAGMA integrity_check;
--match ok
--end
--wait all