From: drh Date: Wed, 24 Jun 2015 23:44:30 +0000 (+0000) Subject: Add the --timeout option to fuzzcheck. X-Git-Tag: version-3.8.11~129 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=92298637ca16fa31bc9989f26646c2ac6ba76be3;p=thirdparty%2Fsqlite.git Add the --timeout option to fuzzcheck. FossilOrigin-Name: a8f4f7fa99e5e4131c1b59c0ac0597d62cedc0cd --- diff --git a/manifest b/manifest index 3df1b17e89..85cfb19708 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\sfuzzcheck\sso\sthat\sit\sworks\swith\sSQLITE_OMIT_PROGRESS_CALLBACK. -D 2015-06-24T23:17:35.758 +C Add\sthe\s--timeout\soption\sto\sfuzzcheck. +D 2015-06-24T23:44:30.800 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 1063c58075b7400d93326b0eb332b48a54f53025 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -657,7 +657,7 @@ F test/fuzz2.test 76dc35b32b6d6f965259508508abce75a6c4d7e1 F test/fuzz3.test efd384b896c647b61a2c1848ba70d42aad60a7b3 F test/fuzz_common.tcl a87dfbb88c2a6b08a38e9a070dabd129e617b45b F test/fuzz_malloc.test 328f70aaca63adf29b4c6f06505ed0cf57ca7c26 -F test/fuzzcheck.c d1f1e5e6e121852f8945024047d23ed8d93cedbc +F test/fuzzcheck.c d98fc1c0274a9e5590fe1da587a611fb5a9c8c60 F test/fuzzdata1.db 7ee3227bad0e7ccdeb08a9e6822916777073c664 F test/fuzzdata2.db f03a420d3b822cc82e4f894ca957618fbe9c4973 F test/fuzzdata3.db b83d0c20ae64113432c03d40c06ba473a4cb696b @@ -1286,7 +1286,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 07937a81c6c90eb7491a843eb65183805f5b675e -R 5cc0fa90b0ff0423f95bf08eb9e98517 +P 7a9c4eb30e6a834da20931b535c2894837d7d5d7 +R 7c2b29e0bcaa87a61978a31cdcf51c57 U drh -Z d84e60857a238f6ff0f0ddefa37726a4 +Z 32917e3ef374b6bc2da8c725488de57e diff --git a/manifest.uuid b/manifest.uuid index ebaef097cc..82c4391168 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -7a9c4eb30e6a834da20931b535c2894837d7d5d7 \ No newline at end of file +a8f4f7fa99e5e4131c1b59c0ac0597d62cedc0cd \ No newline at end of file diff --git a/test/fuzzcheck.c b/test/fuzzcheck.c index 0a6e99f6ea..ccb61e18bc 100644 --- a/test/fuzzcheck.c +++ b/test/fuzzcheck.c @@ -704,6 +704,7 @@ static void showHelp(void){ " --rebuild Rebuild and vacuum the database file\n" " --result-trace Show the results of each SQL command\n" " --sqlid N Use only SQL where sqlid=N\n" +" --timeline N Abort if any single test case needs more than N seconds\n" " -v Increased output\n" " --verbose Increased output\n" ); @@ -737,6 +738,7 @@ int main(int argc, char **argv){ const char *zFailCode = 0; /* Value of the TEST_FAILURE environment variable */ int cellSzCkFlag = 0; /* --cell-size-check */ int sqlFuzz = 0; /* True for SQL fuzz testing. False for DB fuzz */ + int iTimeout = 60; /* Default 60-second timeout */ iBegin = timeOfDay(); #ifdef __unix__ @@ -794,6 +796,10 @@ int main(int argc, char **argv){ if( i>=argc-1 ) fatalError("missing arguments on %s", argv[i]); onlySqlid = atoi(argv[++i]); }else + if( strcmp(z,"timeout")==0 ){ + if( i>=argc-1 ) fatalError("missing arguments on %s", argv[i]); + iTimeout = atoi(argv[++i]); + }else if( strcmp(z,"timeout-test")==0 ){ timeoutTest = 1; #ifndef __unix__ @@ -959,7 +965,7 @@ int main(int argc, char **argv){ rc = sqlite3_open_v2("main.db", &db, openFlags, zVfs); if( rc ) fatalError("cannot open inmem database"); if( cellSzCkFlag ) runSql(db, "PRAGMA cell_size_check=ON", runFlags); - setAlarm(10); + setAlarm(iTimeout); #ifndef SQLITE_OMIT_PROGRESS_CALLBACK if( sqlFuzz || vdbeLimitFlag ){ sqlite3_progress_handler(db, 100000, progressHandler, &vdbeLimitFlag);