]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Try to fix up the "valgrindtest" target in Makefile.in so that it avoids
authordrh <drh@noemail.net>
Thu, 8 Jan 2015 16:47:51 +0000 (16:47 +0000)
committerdrh <drh@noemail.net>
Thu, 8 Jan 2015 16:47:51 +0000 (16:47 +0000)
misuse testing that can trigger false errors.

FossilOrigin-Name: 50b5a8af843fff93452cd1c8f82152124a1d864a

Makefile.in
manifest
manifest.uuid
src/test1.c
test/oserror.test

index d654f96be9f7e2c4a25473f175cdb53bbb32e0dc..42caa69835bc665484ebc72c8b57359ff9a3e0bd 100644 (file)
@@ -952,7 +952,7 @@ test:       testfixture$(TEXE) sqlite3$(TEXE)
 # because valgrind is so much slower than a native machine.
 #
 valgrindtest:  testfixture$(TEXE) sqlite3$(TEXE)
-       valgrind -v ./testfixture$(TEXE) $(TOP)/test/permutations.test valgrind
+       OMIT_MISUSE=1 valgrind -v ./testfixture$(TEXE) $(TOP)/test/permutations.test valgrind
 
 # A very fast test that checks basic sanity.  The name comes from
 # the 60s-era electronics testing:  "Turn it on and see if smoke
index 3134eea58ba2b19ce2dc4f16a0c51599e60e314b..86064253cbf066660f35035c2c2b743d4554a27d 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,7 +1,7 @@
-C Fix\sthe\sextension\stags\son\sthe\s"smoketest"\smakefile\starget\sfor\sWindows.
-D 2015-01-08T02:28:02.318
+C Try\sto\sfix\sup\sthe\s"valgrindtest"\starget\sin\sMakefile.in\sso\sthat\sit\savoids\nmisuse\stesting\sthat\scan\strigger\sfalse\serrors.
+D 2015-01-08T16:47:51.547
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
-F Makefile.in c93eb4b0258e78a7dacfddd328e52827be2c3773
+F Makefile.in b40b4c2a3a187c41ee657d3f0e0e0dfe8fd860b5
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
 F Makefile.msc b363b90fe1bfc3b87d190f2f728a126c00d9ce09
 F Makefile.vxworks 034289efa9d591b04b1a73598623119c306cbba0
@@ -238,7 +238,7 @@ F src/sqliteLimit.h 164b0e6749d31e0daa1a4589a169d31c0dec7b3d
 F src/status.c 81712116e826b0089bb221b018929536b2b5406f
 F src/table.c e7a09215315a978057fb42c640f890160dbcc45e
 F src/tclsqlite.c c6a21c64da1490e14d53cdc2062d1e2e57942622
-F src/test1.c 71f67f0c9f98de15026203bcdb7436268465a866
+F src/test1.c 460d39e7abbcd0c61c9788c06e0d925f4d1e6a22
 F src/test2.c 98049e51a17dc62606a99a9eb95ee477f9996712
 F src/test3.c 1c0e5d6f080b8e33c1ce8b3078e7013fdbcd560c
 F src/test4.c 9b32d22f5f150abe23c1830e2057c4037c45b3df
@@ -768,7 +768,7 @@ F test/orderby4.test 4d39bfbaaa3ae64d026ca2ff166353d2edca4ba4
 F test/orderby5.test 8f08a54836d21fb7c70245360751aedd1c2286fb
 F test/orderby6.test 8b38138ab0972588240b3fca0985d2e400432859
 F test/orderby7.test 3d1383d52ade5b9eb3a173b3147fdd296f0202da
-F test/oserror.test 50417780d0e0d7cd23cf12a8277bb44024765df3
+F test/oserror.test 14fec2796c2b6fe431c7823750e8a18a761176d7
 F test/ovfl.test 4f7ca651cba5c059a12d8c67dddd49bec5747799
 F test/pager1.test 1acbdb14c5952a72dd43129cabdbf69aaa3ed1fa
 F test/pager2.test 67b8f40ae98112bcdba1f2b2d03ea83266418c71
@@ -1235,7 +1235,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 1f2fb77781a93427a2348f821b66dba7310c49b8
-R 8a1de20d0981a3624bba5e9b9b14f4fc
+P 826fd311e7e2849aefbd81724dcb4a5644cfa126
+R 3faebdda7f25c90fe0938a6de3f393ba
 U drh
-Z 06dcf0afe5114ee85b427e54261705d7
+Z 770e2b1cc0fe0d2202d8e9974f70c6d8
index c8083da5a3dd8ab4cd8c779d525fc033eddc3674..52c980db7cda330c4b1120fb3333bcdb15aa07e1 100644 (file)
@@ -1 +1 @@
-826fd311e7e2849aefbd81724dcb4a5644cfa126
\ No newline at end of file
+50b5a8af843fff93452cd1c8f82152124a1d864a
\ No newline at end of file
index 9c0c572f7da3a8ee3a485fe1db5d55ccc2729e95..8cbce7073131246d86b1bb1e34229a4cd0dd59a4 100644 (file)
@@ -261,6 +261,8 @@ static int test_io_trace(
 **
 ** Returns true if the program was compiled using clang with the 
 ** -fsanitize=address switch on the command line. False otherwise.
+**
+** Also return true if the OMIT_MISUSE environment variable exists.
 */
 static int clang_sanitize_address(
   void *NotUsed,
@@ -274,6 +276,7 @@ static int clang_sanitize_address(
   res = 1;
 # endif
 #endif
+  if( res==0 && getenv("OMIT_MISUSE")!=0 ) res = 1;
   Tcl_SetObjResult(interp, Tcl_NewIntObj(res));
   return TCL_OK;
 }
index 40d2966bcca57409fdb25aeb58375261c9a4d6d3..1bfa37cd6c34e6099c69f0bd8bc810c4857f9f0d 100644 (file)
@@ -51,19 +51,20 @@ proc do_re_test {tn script expression} {
 # a call to getcwd() may fail if there are no free file descriptors. So
 # an error may be reported for either open() or getcwd() here.
 #
-puts "Possible valgrind error about invalid file descriptor follows:"
-do_test 1.1.1 {
-  set ::log [list]
-  list [catch {
-    for {set i 0} {$i < 2000} {incr i} { sqlite3 dbh_$i test.db -readonly 1 }
-  } msg] $msg
-} {1 {unable to open database file}}
-do_test 1.1.2 {
-  catch { for {set i 0} {$i < 2000} {incr i} { dbh_$i close } }
-} {1}
-do_re_test 1.1.3 { 
-  lindex $::log 0 
-} {^os_unix.c:\d+: \(\d+\) (open|getcwd)\(.*test.db\) - }
+if {![clang_sanitize_address]} {
+  do_test 1.1.1 {
+    set ::log [list]
+    list [catch {
+      for {set i 0} {$i < 2000} {incr i} { sqlite3 dbh_$i test.db -readonly 1 }
+    } msg] $msg
+  } {1 {unable to open database file}}
+  do_test 1.1.2 {
+    catch { for {set i 0} {$i < 2000} {incr i} { dbh_$i close } }
+  } {1}
+  do_re_test 1.1.3 { 
+    lindex $::log 0 
+  } {^os_unix.c:\d+: \(\d+\) (open|getcwd)\(.*test.db\) - }
+}
 
 
 # Test a failure in open() due to the path being a directory.