mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Add the --info option to the fuzzcheck test utility.
FossilOrigin-Name: 1caaaaa70f21fe71fbe0af227eea8d1367870e2575eedf248cc2a0b515783390
This commit is contained in:
14
manifest
14
manifest
@ -1,5 +1,5 @@
|
|||||||
C Fix\san\soverzealous\sassert()\sstatement\sdiscovered\sby\sOSSFuzz.
|
C Add\sthe\s--info\soption\sto\sthe\sfuzzcheck\stest\sutility.
|
||||||
D 2018-08-06T01:21:53.563
|
D 2018-08-06T01:39:31.617
|
||||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||||
F Makefile.in 0a3a6c81e6fcb969ff9106e882f0a08547014ba463cb6beca4c4efaecc924ee6
|
F Makefile.in 0a3a6c81e6fcb969ff9106e882f0a08547014ba463cb6beca4c4efaecc924ee6
|
||||||
@ -950,9 +950,9 @@ F test/fuzz2.test 76dc35b32b6d6f965259508508abce75a6c4d7e1
|
|||||||
F test/fuzz3.test 9c813e6613b837cb7a277b0383cd66bfa07042b4cf0317157c35852f30043c31
|
F test/fuzz3.test 9c813e6613b837cb7a277b0383cd66bfa07042b4cf0317157c35852f30043c31
|
||||||
F test/fuzz_common.tcl a87dfbb88c2a6b08a38e9a070dabd129e617b45b
|
F test/fuzz_common.tcl a87dfbb88c2a6b08a38e9a070dabd129e617b45b
|
||||||
F test/fuzz_malloc.test 5b257a7652d8ee90b22e9cf80d9dbea31a4f3e6fed1d33de57b24b1bdb211d79
|
F test/fuzz_malloc.test 5b257a7652d8ee90b22e9cf80d9dbea31a4f3e6fed1d33de57b24b1bdb211d79
|
||||||
F test/fuzzcheck.c 3885207dc217c4dcdb2de4a3cb169a263afeef51ab9bd0ba8567289f0a19a470
|
F test/fuzzcheck.c 8074a35ed4ec3735a5e144b7e0e9123d9821a92281756c1a40d43e302dd79243
|
||||||
F test/fuzzdata1.db 7ee3227bad0e7ccdeb08a9e6822916777073c664
|
F test/fuzzdata1.db 7ee3227bad0e7ccdeb08a9e6822916777073c664
|
||||||
F test/fuzzdata2.db f03a420d3b822cc82e4f894ca957618fbe9c4973
|
F test/fuzzdata2.db 128b3feeb78918d075c9b14b48610145a0dd4c8d6f1ca7c2870c7e425f5bf31f
|
||||||
F test/fuzzdata3.db c6586d3e3cef0fbc18108f9bb649aa77bfc38aba
|
F test/fuzzdata3.db c6586d3e3cef0fbc18108f9bb649aa77bfc38aba
|
||||||
F test/fuzzdata4.db b502c7d5498261715812dd8b3c2005bad08b3a26e6489414bd13926cd3e42ed2
|
F test/fuzzdata4.db b502c7d5498261715812dd8b3c2005bad08b3a26e6489414bd13926cd3e42ed2
|
||||||
F test/fuzzdata5.db 5e8394be0245224340c26fc592746dd560479b0dcb12d4b43edf2c612848e748
|
F test/fuzzdata5.db 5e8394be0245224340c26fc592746dd560479b0dcb12d4b43edf2c612848e748
|
||||||
@ -1754,7 +1754,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
|||||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||||
P cdff3af7bedc5ebea04bd9b5e2112d3db451a475c18c9a9ebd45f6f3a89a43cb
|
P d9c9fe9f5ad3fc9123ad29ebafcb7f40dcecd448fb7a928bb31bea8181d81ec1
|
||||||
R 6e44cb0e82bbab33cfe6ecf882309ef6
|
R cf4929d6e11c98e78cbb0fcf83b76d5c
|
||||||
U drh
|
U drh
|
||||||
Z f0dc4a845ad041547ed953532f8f84f9
|
Z 9a0757ff0ae714f2c7ead44f5087933f
|
||||||
|
@ -1 +1 @@
|
|||||||
d9c9fe9f5ad3fc9123ad29ebafcb7f40dcecd448fb7a928bb31bea8181d81ec1
|
1caaaaa70f21fe71fbe0af227eea8d1367870e2575eedf248cc2a0b515783390
|
@ -806,7 +806,7 @@ static void showHelp(void){
|
|||||||
" --export-db DIR Write databases to files(s) in DIR. Works with --dbid\n"
|
" --export-db DIR Write databases to files(s) in DIR. Works with --dbid\n"
|
||||||
" --export-sql DIR Write SQL to file(s) in DIR. Also works with --sqlid\n"
|
" --export-sql DIR Write SQL to file(s) in DIR. Also works with --sqlid\n"
|
||||||
" --help Show this help text\n"
|
" --help Show this help text\n"
|
||||||
" -q|--quiet Reduced output\n"
|
" --info Show information about SOURCE-DB w/o running tests\n"
|
||||||
" --limit-mem N Limit memory used by test SQLite instance to N bytes\n"
|
" --limit-mem N Limit memory used by test SQLite instance to N bytes\n"
|
||||||
" --limit-vdbe Panic if any test runs for more than 100,000 cycles\n"
|
" --limit-vdbe Panic if any test runs for more than 100,000 cycles\n"
|
||||||
" --load-sql ARGS... Load SQL scripts fron files into SOURCE-DB\n"
|
" --load-sql ARGS... Load SQL scripts fron files into SOURCE-DB\n"
|
||||||
@ -816,6 +816,7 @@ static void showHelp(void){
|
|||||||
" --native-malloc Turn off MEMSYS3/5 and Lookaside\n"
|
" --native-malloc Turn off MEMSYS3/5 and Lookaside\n"
|
||||||
" --oss-fuzz Enable OSS-FUZZ testing\n"
|
" --oss-fuzz Enable OSS-FUZZ testing\n"
|
||||||
" --prng-seed N Seed value for the PRGN inside of SQLite\n"
|
" --prng-seed N Seed value for the PRGN inside of SQLite\n"
|
||||||
|
" -q|--quiet Reduced output\n"
|
||||||
" --rebuild Rebuild and vacuum the database file\n"
|
" --rebuild Rebuild and vacuum the database file\n"
|
||||||
" --result-trace Show the results of each SQL command\n"
|
" --result-trace Show the results of each SQL command\n"
|
||||||
" --sqlid N Use only SQL where sqlid=N\n"
|
" --sqlid N Use only SQL where sqlid=N\n"
|
||||||
@ -841,6 +842,7 @@ int main(int argc, char **argv){
|
|||||||
int nativeFlag = 0; /* --native-vfs */
|
int nativeFlag = 0; /* --native-vfs */
|
||||||
int rebuildFlag = 0; /* --rebuild */
|
int rebuildFlag = 0; /* --rebuild */
|
||||||
int vdbeLimitFlag = 0; /* --limit-vdbe */
|
int vdbeLimitFlag = 0; /* --limit-vdbe */
|
||||||
|
int infoFlag = 0; /* --info */
|
||||||
int timeoutTest = 0; /* undocumented --timeout-test flag */
|
int timeoutTest = 0; /* undocumented --timeout-test flag */
|
||||||
int runFlags = 0; /* Flags sent to runSql() */
|
int runFlags = 0; /* Flags sent to runSql() */
|
||||||
char *zMsg = 0; /* Add this message */
|
char *zMsg = 0; /* Add this message */
|
||||||
@ -897,6 +899,9 @@ int main(int argc, char **argv){
|
|||||||
showHelp();
|
showHelp();
|
||||||
return 0;
|
return 0;
|
||||||
}else
|
}else
|
||||||
|
if( strcmp(z,"info")==0 ){
|
||||||
|
infoFlag = 1;
|
||||||
|
}else
|
||||||
if( strcmp(z,"limit-mem")==0 ){
|
if( strcmp(z,"limit-mem")==0 ){
|
||||||
#if !defined(SQLITE_ENABLE_MEMSYS3) && !defined(SQLITE_ENABLE_MEMSYS5)
|
#if !defined(SQLITE_ENABLE_MEMSYS3) && !defined(SQLITE_ENABLE_MEMSYS5)
|
||||||
fatalError("the %s option requires -DSQLITE_ENABLE_MEMSYS5 or _MEMSYS3",
|
fatalError("the %s option requires -DSQLITE_ENABLE_MEMSYS5 or _MEMSYS3",
|
||||||
@ -996,6 +1001,42 @@ int main(int argc, char **argv){
|
|||||||
fatalError("cannot open source database %s - %s",
|
fatalError("cannot open source database %s - %s",
|
||||||
azSrcDb[iSrcDb], sqlite3_errmsg(db));
|
azSrcDb[iSrcDb], sqlite3_errmsg(db));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Print the description, if there is one */
|
||||||
|
if( infoFlag ){
|
||||||
|
int n;
|
||||||
|
zDbName = azSrcDb[iSrcDb];
|
||||||
|
i = (int)strlen(zDbName) - 1;
|
||||||
|
while( i>0 && zDbName[i-1]!='/' && zDbName[i-1]!='\\' ){ i--; }
|
||||||
|
zDbName += i;
|
||||||
|
sqlite3_prepare_v2(db, "SELECT msg FROM readme", -1, &pStmt, 0);
|
||||||
|
if( pStmt && sqlite3_step(pStmt)==SQLITE_ROW ){
|
||||||
|
printf("%s: %s", zDbName, sqlite3_column_text(pStmt,0));
|
||||||
|
}else{
|
||||||
|
printf("%s: (empty \"readme\")", zDbName);
|
||||||
|
}
|
||||||
|
sqlite3_finalize(pStmt);
|
||||||
|
sqlite3_prepare_v2(db, "SELECT count(*) FROM db", -1, &pStmt, 0);
|
||||||
|
if( pStmt
|
||||||
|
&& sqlite3_step(pStmt)==SQLITE_ROW
|
||||||
|
&& (n = sqlite3_column_int(pStmt,0))>0
|
||||||
|
){
|
||||||
|
printf(" - %d DBs", n);
|
||||||
|
}
|
||||||
|
sqlite3_finalize(pStmt);
|
||||||
|
sqlite3_prepare_v2(db, "SELECT count(*) FROM xsql", -1, &pStmt, 0);
|
||||||
|
if( pStmt
|
||||||
|
&& sqlite3_step(pStmt)==SQLITE_ROW
|
||||||
|
&& (n = sqlite3_column_int(pStmt,0))>0
|
||||||
|
){
|
||||||
|
printf(" - %d scripts", n);
|
||||||
|
}
|
||||||
|
sqlite3_finalize(pStmt);
|
||||||
|
printf("\n");
|
||||||
|
sqlite3_close(db);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
rc = sqlite3_exec(db,
|
rc = sqlite3_exec(db,
|
||||||
"CREATE TABLE IF NOT EXISTS db(\n"
|
"CREATE TABLE IF NOT EXISTS db(\n"
|
||||||
" dbid INTEGER PRIMARY KEY, -- database id\n"
|
" dbid INTEGER PRIMARY KEY, -- database id\n"
|
||||||
|
Binary file not shown.
Reference in New Issue
Block a user