From 5f7b5bf41905329bbdc0763136ffedac3f3fbc68 Mon Sep 17 00:00:00 2001 From: drh Date: Thu, 19 Apr 2007 12:30:54 +0000 Subject: [PATCH] Comment changes in the ioerr tests. No changes to code. (CVS 3859) FossilOrigin-Name: b7ed0e1e88a019c830f56abb14658104a30a1c43 --- manifest | 14 +++++++------- manifest.uuid | 2 +- test/tester.tcl | 21 ++++++++++++++------- 3 files changed, 22 insertions(+), 15 deletions(-) diff --git a/manifest b/manifest index 8c0b61a97a..d22330a158 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\sa\sbug\swhereby\ssqlite3_prepare_v2()\scould\sreturn\sboth\san\sout-of-memory\serror\sand\sa\svalid\sstatement\shandle.\s(CVS\s3858) -D 2007-04-19T11:09:01 +C Comment\schanges\sin\sthe\sioerr\stests.\s\sNo\schanges\sto\scode.\s(CVS\s3859) +D 2007-04-19T12:30:54 F Makefile.in 8cab54f7c9f5af8f22fd97ddf1ecfd1e1860de62 F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028 @@ -324,7 +324,7 @@ F test/table.test feea6a3eb08cf166f570255eea5447e42ef82498 F test/tableapi.test 036575a98dcce7c92e9f39056839bbad8a715412 F test/tclsqlite.test 51334389283c74bcbe28645a73159b17e239e9f3 F test/temptable.test c36f3e5a94507abb64f7ba23deeb4e1a8a8c3821 -F test/tester.tcl 0fb5d0b93b05c41a1efcd3010fc6cf66f620a42e +F test/tester.tcl effe3dae968afd8bb27c8792883788eeba821942 F test/thread1.test 776c9e459b75ba905193b351926ac4019b049f35 F test/thread2.test 6d7b30102d600f51b4055ee3a5a19228799049fb F test/threadtest1.c 6029d9c5567db28e6dc908a0c63099c3ba6c383b @@ -459,7 +459,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5 -P b623538c559498b858fd9088faf0f3457b024968 -R 34a9c9622b6327def09bfe5f09cfc0a2 -U danielk1977 -Z bae87dbb6b82dc5bb5cdcc29876b1ea7 +P 8795d11c3c5bb39d34bc5194621ce97097a320e7 +R 881cddcd5870bcd2cccfc66d1e72ef6f +U drh +Z 698c62f2beadbeaf34d69daba13ce366 diff --git a/manifest.uuid b/manifest.uuid index b076cac273..96c6114d7b 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -8795d11c3c5bb39d34bc5194621ce97097a320e7 \ No newline at end of file +b7ed0e1e88a019c830f56abb14658104a30a1c43 \ No newline at end of file diff --git a/test/tester.tcl b/test/tester.tcl index 3b09049e44..17f6b4d206 100644 --- a/test/tester.tcl +++ b/test/tester.tcl @@ -11,7 +11,7 @@ # This file implements some common TCL routines used for regression # testing the SQLite library # -# $Id: tester.tcl,v 1.78 2007/04/13 03:23:21 drh Exp $ +# $Id: tester.tcl,v 1.79 2007/04/19 12:30:54 drh Exp $ # Make sure tclsqlite3 was compiled correctly. Abort now with an # error message if not. @@ -453,26 +453,33 @@ proc do_ioerr_test {testname args} { # a result of the script, the Nth will fail. do_test $testname.$n.3 { set r [catch $::ioerrorbody msg] - # puts rc=[sqlite3_errcode $::DB] set rc [sqlite3_errcode $::DB] if {$::ioerropts(-erc)} { - # In extended result mode, all IOERRs are qualified + # If we are in extended result code mode, make sure all of the + # IOERRs we get back really do have their extended code values. + # If an extended result code is returned, the sqlite3_errcode + # TCLcommand will return a string of the form: SQLITE_IOERR+nnnn + # where nnnn is a number if {[regexp {^SQLITE_IOERR} $rc] && ![regexp {IOERR\+\d} $rc]} { return $rc } } else { - # Not in extended result mode, no errors are qualified + # If we are not in extended result code mode, make sure no + # extended error codes are returned. if {[regexp {\+\d} $rc]} { return $rc } } + # The test repeats as long as $::go is true. set ::go [expr {$::sqlite_io_error_pending<=0}] set s [expr $::sqlite_io_error_hit==0] set ::sqlite_io_error_hit 0 - # puts "$::sqlite_io_error_pending $r $msg" - # puts "r=$r s=$s go=$::go msg=\"$msg\"" + + # One of two things must have happened. either + # 1. We never hit the IO error and the SQL returned OK + # 2. An IO error was hit and the SQL failed + # expr { ($s && !$r && !$::go) || (!$s && $r && $::go) } - # expr {$::sqlite_io_error_pending>0 || $r!=0} } {1} # If an IO error occured, then the checksum of the database should