/ Check-in [50b5a8af]
Login

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

Overview
Comment:Try to fix up the "valgrindtest" target in Makefile.in so that it avoids misuse testing that can trigger false errors.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 50b5a8af843fff93452cd1c8f82152124a1d864a
User & Date: drh 2015-01-08 16:47:51
Context
2015-01-08
22:08
Omit modules from the "valgrind" permutation that fork off separate processes. Also omit selectG.test because it is timing sensitive and valgrind is too slow to get the right answer. check-in: 662932a6 user: drh tags: trunk
20:06
Merge recent enhancements from trunk, including test scripts enhancements and the removal of limits on the number of terms in a VALUES clause. check-in: 5a2dec55 user: drh tags: sessions
19:55
Merge the testing enhancements and the unlimited VALUES enhancement from trunk. check-in: cc780842 user: drh tags: apple-osx
16:47
Try to fix up the "valgrindtest" target in Makefile.in so that it avoids misuse testing that can trigger false errors. check-in: 50b5a8af user: drh tags: trunk
02:28
Fix the extension tags on the "smoketest" makefile target for Windows. check-in: 826fd311 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to Makefile.in.

   948    948   test:	testfixture$(TEXE) sqlite3$(TEXE)
   949    949   	./testfixture$(TEXE) $(TOP)/test/veryquick.test
   950    950   
   951    951   # Run a test using valgrind.  This can take a really long time
   952    952   # because valgrind is so much slower than a native machine.
   953    953   #
   954    954   valgrindtest:	testfixture$(TEXE) sqlite3$(TEXE)
   955         -	valgrind -v ./testfixture$(TEXE) $(TOP)/test/permutations.test valgrind
          955  +	OMIT_MISUSE=1 valgrind -v ./testfixture$(TEXE) $(TOP)/test/permutations.test valgrind
   956    956   
   957    957   # A very fast test that checks basic sanity.  The name comes from
   958    958   # the 60s-era electronics testing:  "Turn it on and see if smoke
   959    959   # comes out."
   960    960   #
   961    961   smoketest:	testfixture$(TEXE)
   962    962   	./testfixture$(TEXE) $(TOP)/test/main.test

Changes to src/test1.c.

   257    257   }
   258    258   
   259    259   /*
   260    260   ** Usage:  clang_sanitize_address 
   261    261   **
   262    262   ** Returns true if the program was compiled using clang with the 
   263    263   ** -fsanitize=address switch on the command line. False otherwise.
          264  +**
          265  +** Also return true if the OMIT_MISUSE environment variable exists.
   264    266   */
   265    267   static int clang_sanitize_address(
   266    268     void *NotUsed,
   267    269     Tcl_Interp *interp,    /* The TCL interpreter that invoked this command */
   268    270     int argc,              /* Number of arguments */
   269    271     char **argv            /* Text of each argument */
   270    272   ){
   271    273     int res = 0;
   272    274   #if defined(__has_feature)
   273    275   # if __has_feature(address_sanitizer)
   274    276     res = 1;
   275    277   # endif
   276    278   #endif
          279  +  if( res==0 && getenv("OMIT_MISUSE")!=0 ) res = 1;
   277    280     Tcl_SetObjResult(interp, Tcl_NewIntObj(res));
   278    281     return TCL_OK;
   279    282   }
   280    283     
   281    284   /*
   282    285   ** Usage:  sqlite3_exec_printf  DB  FORMAT  STRING
   283    286   **

Changes to test/oserror.test.

    47     47   # Test a failure in open() due to too many files. 
    48     48   #
    49     49   # The xOpen() method of the unix VFS calls getcwd() as well as open().
    50     50   # Although this does not appear to be documented in the man page, on OSX
    51     51   # a call to getcwd() may fail if there are no free file descriptors. So
    52     52   # an error may be reported for either open() or getcwd() here.
    53     53   #
    54         -puts "Possible valgrind error about invalid file descriptor follows:"
    55         -do_test 1.1.1 {
    56         -  set ::log [list]
    57         -  list [catch {
    58         -    for {set i 0} {$i < 2000} {incr i} { sqlite3 dbh_$i test.db -readonly 1 }
    59         -  } msg] $msg
    60         -} {1 {unable to open database file}}
    61         -do_test 1.1.2 {
    62         -  catch { for {set i 0} {$i < 2000} {incr i} { dbh_$i close } }
    63         -} {1}
    64         -do_re_test 1.1.3 { 
    65         -  lindex $::log 0 
    66         -} {^os_unix.c:\d+: \(\d+\) (open|getcwd)\(.*test.db\) - }
           54  +if {![clang_sanitize_address]} {
           55  +  do_test 1.1.1 {
           56  +    set ::log [list]
           57  +    list [catch {
           58  +      for {set i 0} {$i < 2000} {incr i} { sqlite3 dbh_$i test.db -readonly 1 }
           59  +    } msg] $msg
           60  +  } {1 {unable to open database file}}
           61  +  do_test 1.1.2 {
           62  +    catch { for {set i 0} {$i < 2000} {incr i} { dbh_$i close } }
           63  +  } {1}
           64  +  do_re_test 1.1.3 { 
           65  +    lindex $::log 0 
           66  +  } {^os_unix.c:\d+: \(\d+\) (open|getcwd)\(.*test.db\) - }
           67  +}
    67     68   
    68     69   
    69     70   # Test a failure in open() due to the path being a directory.
    70     71   #
    71     72   do_test 1.2.1 {
    72     73     file mkdir dir.db
    73     74     set ::log [list]