Update the threadtest3 test program so that its output summary is
compatible with releasetest.tcl. In threadtest3, do not record errors that contain the string "no such table" as being fatal errors, since they happen sometimes in a race condition in stress1. FossilOrigin-Name: 98cb56e2401ae7e113b071df8997ba62265821d3
This commit is contained in:
parent
55e115f060
commit
9486c1b020
16
manifest
16
manifest
@ -1,5 +1,5 @@
|
||||
C Fix\sproblems\swith\sthe\s"inmemory_journal"\spermutation.
|
||||
D 2014-12-30T18:07:34.789
|
||||
C Update\sthe\sthreadtest3\stest\sprogram\sso\sthat\sits\soutput\ssummary\sis\s\ncompatible\swith\sreleasetest.tcl.\s\sIn\sthreadtest3,\sdo\snot\srecord\serrors\nthat\scontain\sthe\sstring\s"no\ssuch\stable"\sas\sbeing\sfatal\serrors,\ssince\sthey\nhappen\ssometimes\sin\sa\srace\scondition\sin\sstress1.
|
||||
D 2014-12-30T19:26:07.267
|
||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||
F Makefile.in 40326b6d788007dd5e00587c54adcd2621832bb3
|
||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||
@ -914,7 +914,7 @@ F test/thread2.test f35d2106452b77523b3a2b7d1dcde2e5ee8f9e46
|
||||
F test/thread_common.tcl 334639cadcb9f912bf82aa73f49efd5282e6cadd
|
||||
F test/threadtest1.c 6029d9c5567db28e6dc908a0c63099c3ba6c383b
|
||||
F test/threadtest2.c ace893054fa134af3fc8d6e7cfecddb8e3acefb9
|
||||
F test/threadtest3.c f8c6595664a4c5ef5f28d97a612386fe14dd1940
|
||||
F test/threadtest3.c 66c2693d888f9ed256d54d70dd60f569d92c12cf
|
||||
F test/threadtest4.c c1e67136ceb6c7ec8184e56ac61db28f96bd2925
|
||||
F test/tkt-02a8e81d44.test 6c80d9c7514e2a42d4918bf87bf6bc54f379110c
|
||||
F test/tkt-26ff0c2d1e.test 888324e751512972c6e0d1a09df740d8f5aaf660
|
||||
@ -1078,7 +1078,7 @@ F test/triggerB.test 56780c031b454abac2340dbb3b71ac5c56c3d7fe
|
||||
F test/triggerC.test a68980c5955d62ee24be6f97129d824f199f9a4c
|
||||
F test/triggerD.test 8e7f3921a92a5797d472732108109e44575fa650
|
||||
F test/triggerE.test 355e9c5cbaed5cd039a60baad1fb2197caeb8e52
|
||||
F test/tt3_checkpoint.c 5e63ee65ed5f87176e25a996480cb02c6caec8b4
|
||||
F test/tt3_checkpoint.c 9e75cf7c1c364f52e1c47fd0f14c4340a9db0fe1
|
||||
F test/tt3_index.c 39eec10a35f57672225be4d182862152896dee4a
|
||||
F test/tt3_lookaside1.c 0377e202c3c2a50d688cb65ba203afeda6fafeb9
|
||||
F test/tt3_stress.c c57d804716165811d979d4a719e05baccd79277f
|
||||
@ -1234,7 +1234,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 776648412c30dce206f1024ff849c2cb025bb006
|
||||
R d8ec23380207a0894ebd8ce1599deb6c
|
||||
U dan
|
||||
Z 8cab0a0cf2d75b3466c28901d182f0a0
|
||||
P 79693f0412ffb0486b974ee6c63b4231cfff5a77
|
||||
R 5cf8bac225464c2ed58e93713858c6ef
|
||||
U drh
|
||||
Z 61949e8b38696d2e4ed6889c396c567f
|
||||
|
@ -1 +1 @@
|
||||
79693f0412ffb0486b974ee6c63b4231cfff5a77
|
||||
98cb56e2401ae7e113b071df8997ba62265821d3
|
@ -1,41 +1,41 @@
|
||||
|
||||
/*
|
||||
** 2010-07-22
|
||||
**
|
||||
** The author disclaims copyright to this source code. In place of
|
||||
** a legal notice, here is a blessing:
|
||||
**
|
||||
** May you do good and not evil.
|
||||
** May you find forgiveness for yourself and forgive others.
|
||||
** May you share freely, never taking more than you give.
|
||||
**
|
||||
*************************************************************************
|
||||
**
|
||||
** The code in this file runs a few multi-threaded test cases using the
|
||||
** SQLite library. It can be compiled to an executable on unix using the
|
||||
** following command:
|
||||
**
|
||||
** gcc -O2 threadtest3.c sqlite3.c -ldl -lpthread -lm
|
||||
**
|
||||
** Then run the compiled program. The exit status is non-zero if any tests
|
||||
** failed (hopefully there is also some output to stdout to clarify what went
|
||||
** wrong).
|
||||
** Even though threadtest3.c is the only C source code file mentioned on
|
||||
** the compiler command-line, #include macros are used to pull in additional
|
||||
** C code files named "tt3_*.c".
|
||||
**
|
||||
** There are three parts to the code in this file, in the following order:
|
||||
** After compiling, run this program with an optional argument telling
|
||||
** which test to run. All tests are run if no argument is given. The
|
||||
** argument can be a glob pattern to match multiple tests. Examples:
|
||||
**
|
||||
** 1. Code for the SQL aggregate function md5sum() copied from
|
||||
** tclsqlite.c in the SQLite distribution. The names of all the
|
||||
** types and functions in this section begin with "MD5" or "md5".
|
||||
** ./a.out -- Run all tests
|
||||
** ./a.out walthread3 -- Run the "walthread3" test
|
||||
** ./a.out 'wal*' -- Run all of the wal* tests
|
||||
** ./a.out --help -- List all available tests
|
||||
**
|
||||
** 2. A set of utility functions that may be used to implement
|
||||
** multi-threaded test cases. These are all called by test code
|
||||
** via macros that help with error reporting. The macros are defined
|
||||
** immediately below this comment.
|
||||
**
|
||||
** 3. The test code itself. And a main() routine to drive the test
|
||||
** code.
|
||||
** The exit status is non-zero if any test fails.
|
||||
*/
|
||||
|
||||
/*************************************************************************
|
||||
** Start of test code/infrastructure interface macros.
|
||||
**
|
||||
** The following macros constitute the interface between the test
|
||||
** programs and the test infrastructure. Test infrastructure code
|
||||
** does not itself use any of these macros. Test code should not
|
||||
** call any of the macroname_x() functions directly.
|
||||
**
|
||||
** See the header comments above the corresponding macroname_x()
|
||||
** function for a description of each interface.
|
||||
/*
|
||||
** The "Set Error Line" macro.
|
||||
*/
|
||||
#define SEL(e) ((e)->iLine = ((e)->rc ? (e)->iLine : __LINE__))
|
||||
|
||||
/* Database functions */
|
||||
#define opendb(w,x,y,z) (SEL(w), opendb_x(w,x,y,z))
|
||||
@ -391,9 +391,9 @@ static void md5finalize(sqlite3_context *context){
|
||||
sqlite3_result_text(context, zBuf, -1, SQLITE_TRANSIENT);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
/*
|
||||
** End of copied md5sum() code.
|
||||
*/
|
||||
**************************************************************************/
|
||||
|
||||
typedef sqlite3_int64 i64;
|
||||
|
||||
@ -448,7 +448,8 @@ static void free_err(Error *p){
|
||||
static void print_err(Error *p){
|
||||
if( p->rc!=SQLITE_OK ){
|
||||
printf("Error: (%d) \"%s\" at line %d\n", p->rc, p->zErr, p->iLine);
|
||||
nGlobalErr++;
|
||||
if( sqlite3_strglob("* - no such table: *",p->zErr)!=0 ) nGlobalErr++;
|
||||
fflush(stdout);
|
||||
}
|
||||
}
|
||||
|
||||
@ -785,6 +786,7 @@ static void join_all_threads_x(
|
||||
if( pErr->rc==SQLITE_OK ) system_error(pErr, rc);
|
||||
}else{
|
||||
printf("Thread %d says: %s\n", p->iTid, (ret==0 ? "..." : (char *)ret));
|
||||
fflush(stdout);
|
||||
}
|
||||
sqlite3_free(p);
|
||||
}
|
||||
@ -898,11 +900,6 @@ static int timetostop_x(
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
** The "Set Error Line" macro.
|
||||
*/
|
||||
#define SEL(e) ((e)->iLine = ((e)->rc ? (e)->iLine : __LINE__))
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
**************************************************************************
|
||||
@ -1427,9 +1424,9 @@ static void dynamic_triggers(int nMs){
|
||||
|
||||
int main(int argc, char **argv){
|
||||
struct ThreadTest {
|
||||
void (*xTest)(int);
|
||||
const char *zTest;
|
||||
int nMs;
|
||||
void (*xTest)(int); /* Routine for running this test */
|
||||
const char *zTest; /* Name of this test */
|
||||
int nMs; /* How long to run this test, in milliseconds */
|
||||
} aTest[] = {
|
||||
{ walthread1, "walthread1", 20000 },
|
||||
{ walthread2, "walthread2", 20000 },
|
||||
@ -1452,7 +1449,7 @@ int main(int argc, char **argv){
|
||||
};
|
||||
|
||||
int i;
|
||||
int bTestfound = 0;
|
||||
int nTestfound = 0;
|
||||
|
||||
sqlite3_config(SQLITE_CONFIG_MULTITHREAD);
|
||||
sqlite3_config(SQLITE_CONFIG_MULTITHREAD);
|
||||
@ -1468,12 +1465,13 @@ int main(int argc, char **argv){
|
||||
}
|
||||
|
||||
printf("Running %s for %d seconds...\n", z, aTest[i].nMs/1000);
|
||||
fflush(stdout);
|
||||
aTest[i].xTest(aTest[i].nMs);
|
||||
bTestfound++;
|
||||
nTestfound++;
|
||||
}
|
||||
if( bTestfound==0 ) goto usage;
|
||||
if( nTestfound==0 ) goto usage;
|
||||
|
||||
printf("Total of %d errors across all tests\n", nGlobalErr);
|
||||
printf("%d errors out of %d tests\n", nGlobalErr, nTestfound);
|
||||
return (nGlobalErr>0 ? 255 : 0);
|
||||
|
||||
usage:
|
||||
@ -1485,5 +1483,3 @@ int main(int argc, char **argv){
|
||||
|
||||
return 254;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
** 2001 September 15
|
||||
** 2011-02-02
|
||||
**
|
||||
** The author disclaims copyright to this source code. In place of
|
||||
** a legal notice, here is a blessing:
|
||||
@ -146,5 +146,3 @@ static void checkpoint_starvation_2(int nMs){
|
||||
}
|
||||
print_and_free_err(&err);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user