Re: [sqlite] test fixture tcl errors on Windows
a better patch... Index: test/exclusive2.test === RCS file: /sqlite/sqlite/test/exclusive2.test,v retrieving revision 1.4 diff -u -3 -p -r1.4 exclusive2.test --- test/exclusive2.test16 Apr 2007 15:02:20 - 1.4 +++ test/exclusive2.test25 Apr 2007 03:05:04 - @@ -161,6 +161,7 @@ do_test exclusive2-2.4 { seek $fd 1024 puts -nonewline $fd [string repeat [binary format c 0] 1] flush $fd + close $fd t1sig } $::sig @@ -242,4 +243,8 @@ do_test exclusive2-3.6 { pagerChangeCounter test.db } {5} +db close +file delete -force test.db +file delete -force test.db-journal + finish_test __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] test fixture tcl errors on Windows
The test script itself has the test.db open, and as result Windows cannot delete an open file. It worked on UNIX because you can delete anything at any time whether it is open, running, locked or whatever. If you apply this patch, exclusive2.test will run to completion on cygwin without error. It ought to work on MinGW as well. Index: test/exclusive2.test === RCS file: /sqlite/sqlite/test/exclusive2.test,v retrieving revision 1.4 diff -u -3 -p -r1.4 exclusive2.test --- test/exclusive2.test16 Apr 2007 15:02:20 - 1.4 +++ test/exclusive2.test25 Apr 2007 02:42:56 - @@ -161,6 +161,7 @@ do_test exclusive2-2.4 { seek $fd 1024 puts -nonewline $fd [string repeat [binary format c 0] 1] flush $fd + close $fd t1sig } $::sig --- Dennis Cote <[EMAIL PROTECTED]> wrote: > I'm getting a strange failure of the test suite on Windows (XP all > updates). The exclusive2 test is getting a permission denied error when > deleting a file. I can manually delete the file and the tclsh can > execute the same file delete command if I enter it manually. > > $ ./testfixture.exe ../sqlite/test/exclusive2.test > exclusive2-1.0... Ok > exclusive2-1.1... Ok > exclusive2-1.2... Ok > exclusive2-1.3... Ok > exclusive2-1.4... Ok > exclusive2-1.5... Ok > exclusive2-1.6... Ok > exclusive2-1.7... Ok > exclusive2-1.9... Ok > exclusive2-1.10... Ok > exclusive2-1.11... Ok > exclusive2-2.1... Ok > exclusive2-2.2... Ok > exclusive2-2.3... Ok > exclusive2-2.4... Ok > exclusive2-2.5... Ok > exclusive2-2.6... Ok > exclusive2-2.7... Ok > exclusive2-2.8... Ok > c:\SQLite\SQLiteV3\build\testfixture.exe: error deleting "test.db": > permission denied > while executing > "file delete -force test.db" > (file "../sqlite/test/exclusive2.test" line 192) > > $ ls test.db > test.db > > $ tclsh > file delete -force test.db > exit > > $ ls test.db > ls: test.db: No such file or directory > > I'm building SQLite and running these tests using MinGW/MSYS. I haven't > had any problems before, but I haven't built sqlite from source since > around version 3.3.12. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] test fixture tcl errors on Windows
Dennis Cote wrote: I don't know enough TCL to know if there is a subtle bug here or not. I suspect that perhaps the file isn't really being closed until the script exits.Does this seem possible? Dennis Cote Get "filemon" from www.sysinternals.com. Set a filter to monitor all files in the directory containing the database file (or some other reasonable filter expression). Comment out all of the tests from the script that pass. Then fire it up :) - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] test fixture tcl errors on Windows
[EMAIL PROTECTED] wrote: My guess is that your virus scanning software is opening the test.db file as sson as SQLite closes it, in order to check it for new viruses. The test script tries to delete the file right after closing it, but it can't because the virus scanner has it open. I don't have a virus scanner on this PC. It sits behind a virus scanning firewall, and they trust us enough not to put in virus laden disks. I don't have any indexing software either. I did have an explorer window open displaying that directory, but I get the same result with that window closed. I just skipped the exclusive2 tests by editing the exclude list in the quick test file. All other test run to completion. I got one error due to differences in floating point exponent formating between TCL on windows and linux (at least that is my suspicion). alter-7.1... Expected: [text 1 integer -2 text 5.4e-8 real 5.4e-08] Got: [text 1 integer -2 text 5.4e-8 real 5.4e-008] I just can't see why it can't delete that file. I modified the exclusive2.test file and wrapped the file delete commands in catch blocks so they wouldn't halt the test, and then changed the name of the database file used for the 3.x tests from test.db to test3.db. I also added a pair of file delete commands in catch blocks to remove the test3.db file. Now when I run this test set I get no failures. $ ./testfixture.exe ../sqlite/test/exclusive2.test exclusive2-1.0... Ok exclusive2-1.1... Ok exclusive2-1.2... Ok exclusive2-1.3... Ok exclusive2-1.4... Ok exclusive2-1.5... Ok exclusive2-1.6... Ok exclusive2-1.7... Ok exclusive2-1.9... Ok exclusive2-1.10... Ok exclusive2-1.11... Ok exclusive2-2.1... Ok exclusive2-2.2... Ok exclusive2-2.3... Ok exclusive2-2.4... Ok exclusive2-2.5... Ok exclusive2-2.6... Ok exclusive2-2.7... Ok exclusive2-2.8... Ok exclusive2-3.0... Ok exclusive2-3.1... Ok exclusive2-3.2... Ok exclusive2-3.3... Ok exclusive2-3.4... Ok exclusive2-3.5... Ok exclusive2-3.6... Ok Thread-specific data deallocated properly 0 errors out of 27 tests Failures on these tests: But I can see that neither the test.db file or the new test3.db were deleted. The only thing I can see that is common to these files is that they are both passed to the pagerChangeCounter command which is only used in this test. proc pagerChangeCounter {filename {new ""}} { set fd [open $filename RDWR] fconfigure $fd -translation binary -encoding binary if {$new ne ""} { seek $fd 24 set a [expr {($new&0xFF00)>>24}] set b [expr {($new&0x00FF)>>16}] set c [expr {($new&0xFF00)>>8}] set d [expr {($new&0x00FF)}] puts -nonewline $fd [binary format $a $b $c $d] flush $fd } seek $fd 24 foreach {a b c d} [list 0 0 0 0] {} binary scan [read $fd 4] a b c d set ret [expr ($a&0x00FF)<<24] incr ret [expr ($b&0x00FF)<<16] incr ret [expr ($c&0x00FF)<<8] incr ret [expr ($d&0x00FF)<<0] close $fd return $ret } I don't know enough TCL to know if there is a subtle bug here or not. I suspect that perhaps the file isn't really being closed until the script exits.Does this seem possible? Dennis Cote - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] test fixture tcl errors on Windows
Dennis Cote <[EMAIL PROTECTED]> wrote: > I'm getting a strange failure of the test suite on Windows (XP all > updates). > exclusive2-2.8... Ok > c:\SQLite\SQLiteV3\build\testfixture.exe: error deleting "test.db": > permission denied > while executing > "file delete -force test.db" > (file "../sqlite/test/exclusive2.test" line 192) > > > Do any of you TCL experts have any idea what could be wrong? > My guess is that your virus scanning software is opening the test.db file as sson as SQLite closes it, in order to check it for new viruses. The test script tries to delete the file right after closing it, but it can't because the virus scanner has it open. -- D. Richard Hipp <[EMAIL PROTECTED]> - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] test fixture tcl errors on Windows
I'm getting a strange failure of the test suite on Windows (XP all updates). The exclusive2 test is getting a permission denied error when deleting a file. I can manually delete the file and the tclsh can execute the same file delete command if I enter it manually. $ ./testfixture.exe ../sqlite/test/exclusive2.test exclusive2-1.0... Ok exclusive2-1.1... Ok exclusive2-1.2... Ok exclusive2-1.3... Ok exclusive2-1.4... Ok exclusive2-1.5... Ok exclusive2-1.6... Ok exclusive2-1.7... Ok exclusive2-1.9... Ok exclusive2-1.10... Ok exclusive2-1.11... Ok exclusive2-2.1... Ok exclusive2-2.2... Ok exclusive2-2.3... Ok exclusive2-2.4... Ok exclusive2-2.5... Ok exclusive2-2.6... Ok exclusive2-2.7... Ok exclusive2-2.8... Ok c:\SQLite\SQLiteV3\build\testfixture.exe: error deleting "test.db": permission denied while executing "file delete -force test.db" (file "../sqlite/test/exclusive2.test" line 192) $ ls test.db test.db $ tclsh file delete -force test.db exit $ ls test.db ls: test.db: No such file or directory I'm building SQLite and running these tests using MinGW/MSYS. I haven't had any problems before, but I haven't built sqlite from source since around version 3.3.12. Do any of you TCL experts have any idea what could be wrong? TIA Dennis Cote - To unsubscribe, send email to [EMAIL PROTECTED] -