/ Check-in [c8cd7804]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Improved handling of the -v option on the fuzzcheck test program.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c8cd7804dc905b2b20cd7c0192bcfaceaaa7e2a8
User & Date: drh 2016-02-18 14:03:15
Context
2016-02-18
14:49
Avoid a potential buffer overrun if an SQL statement being parsed ends with an illegal "!" token. (This problem was detected by fuzzcheck running under valgrind. The problem was introduced by check-in [9570b6b43df3], two days ago and has not appeared in a release.) check-in: 2a8d97e7 user: drh tags: trunk
14:03
Improved handling of the -v option on the fuzzcheck test program. check-in: c8cd7804 user: drh tags: trunk
13:32
Remove an unnecessary "include <tcl.h>" line from fts5_test_mi.c. check-in: 31d8b69e user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/fuzzcheck.c.

   780    780   "each database, checking for crashes and memory leaks.\n"
   781    781   "Options:\n"
   782    782   "  --cell-size-check     Set the PRAGMA cell_size_check=ON\n"
   783    783   "  --dbid N              Use only the database where dbid=N\n"
   784    784   "  --export-db DIR       Write databases to files(s) in DIR. Works with --dbid\n"
   785    785   "  --export-sql DIR      Write SQL to file(s) in DIR. Also works with --sqlid\n"
   786    786   "  --help                Show this help text\n"
   787         -"  -q                    Reduced output\n"
   788         -"  --quiet               Reduced output\n"
          787  +"  -q|--quiet            Reduced output\n"
   789    788   "  --limit-mem N         Limit memory used by test SQLite instance to N bytes\n"
   790    789   "  --limit-vdbe          Panic if an sync SQL runs for more than 100,000 cycles\n"
   791    790   "  --load-sql ARGS...    Load SQL scripts fro files into SOURCE-DB\n"
   792    791   "  --load-db ARGS...     Load template databases from files into SOURCE_DB\n"
   793    792   "  -m TEXT               Add a description to the database\n"
   794    793   "  --native-vfs          Use the native VFS for initially empty database files\n"
   795    794   "  --rebuild             Rebuild and vacuum the database file\n"
   796    795   "  --result-trace        Show the results of each SQL command\n"
   797    796   "  --sqlid N             Use only SQL where sqlid=N\n"
   798    797   "  --timeout N           Abort if any single test case needs more than N seconds\n"
   799         -"  -v                    Increased output\n"
   800         -"  --verbose             Increased output\n"
          798  +"  -v|--verbose          Increased output.  Repeat for more output.\n"
   801    799     );
   802    800   }
   803    801   
   804    802   int main(int argc, char **argv){
   805    803     sqlite3_int64 iBegin;        /* Start time of this program */
   806    804     int quietFlag = 0;           /* True if --quiet or -q */
   807    805     int verboseFlag = 0;         /* True if --verbose or -v */
................................................................................
   916    914           timeoutTest = 1;
   917    915   #ifndef __unix__
   918    916           fatalError("timeout is not available on non-unix systems");
   919    917   #endif
   920    918         }else
   921    919         if( strcmp(z,"verbose")==0 || strcmp(z,"v")==0 ){
   922    920           quietFlag = 0;
   923         -        verboseFlag = 1;
   924         -        runFlags |= SQL_TRACE;
          921  +        verboseFlag++;
          922  +        if( verboseFlag>1 ) runFlags |= SQL_TRACE;
   925    923         }else
   926    924         {
   927    925           fatalError("unknown option: %s", argv[i]);
   928    926         }
   929    927       }else{
   930    928         nSrcDb++;
   931    929         azSrcDb = safe_realloc(azSrcDb, nSrcDb*sizeof(azSrcDb[0]));