From 3e37f5df5b6963ad94760a64b965f437c62feb87 Mon Sep 17 00:00:00 2001 From: danielk1977 Date: Thu, 18 Sep 2008 11:18:41 +0000 Subject: [PATCH] Changes to test script io.test to work on symbian. (CVS 5717) FossilOrigin-Name: 2b41c4959da2ef5a882a658e85ee34d07d31f379 --- manifest | 14 +++++++------- manifest.uuid | 2 +- test/io.test | 46 +++++++++++++++++++++++++++------------------- 3 files changed, 35 insertions(+), 27 deletions(-) diff --git a/manifest b/manifest index b8679485a1..131caabebf 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Performance\simprovements\sin\sgetAndInitPage():\somit\sthe\supper\sbound\scheck\son\npage\snumber\sif\sthe\spage\sis\salready\sin\scache.\s(CVS\s5716) -D 2008-09-18T01:08:16 +C Changes\sto\stest\sscript\sio.test\sto\swork\son\ssymbian.\s(CVS\s5717) +D 2008-09-18T11:18:41 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.in d15a7ebfe5e057a72a49805ffb302dbb601c8329 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 @@ -378,7 +378,7 @@ F test/insert4.test 6e382eaf7295a4463e6f29ea20fcd8e63d097eeb F test/insert5.test 1f93cbe9742110119133d7e8e3ccfe6d7c249766 F test/interrupt.test 42e7cf98646fd9cb4a3b131a93ed3c50b9e149f1 F test/intpkey.test 537669fd535f62632ca64828e435b9e54e8d677f -F test/io.test 92cedb5eff70064f9fcf4ec51e86591b1f0ad130 +F test/io.test d80d0682be7c4ce2f0da1dfe0444a2ba563df949 F test/ioerr.test b42f249c9181b5864e53fdae38ef75475d71c66f F test/ioerr2.test a8428580ce12ce67a6f16d85e2640fa6ce2da888 F test/ioerr3.test d3cec5e1a11ad6d27527d0d38573fbff14c71bdd @@ -637,7 +637,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81 F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 1dbced29de5f59ba2ebf877edcadf171540374d1 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e -P a7fd9e622bc1050e78f227ec42b6ba90c87c865a -R e81f4600bcea4a2618108ffa41a20258 -U drh -Z e79e626cd696de5d56149e65cface269 +P badd0873e6dffac9463b06a381b9f797a54d33e9 +R c960d4325ae6e924ae5c620820d9e695 +U danielk1977 +Z 3fd7fc9ce11902ac8ce0b52beafd96c6 diff --git a/manifest.uuid b/manifest.uuid index 1a1397b9b1..f4d4e258ba 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -badd0873e6dffac9463b06a381b9f797a54d33e9 \ No newline at end of file +2b41c4959da2ef5a882a658e85ee34d07d31f379 \ No newline at end of file diff --git a/test/io.test b/test/io.test index 0dccd503b5..54401785bf 100644 --- a/test/io.test +++ b/test/io.test @@ -13,7 +13,7 @@ # IO traffic generated by SQLite (making sure SQLite is not writing out # more database pages than it has to, stuff like that). # -# $Id: io.test,v 1.18 2008/08/20 14:49:25 danielk1977 Exp $ +# $Id: io.test,v 1.19 2008/09/18 11:18:41 danielk1977 Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -400,9 +400,12 @@ ifcapable pager_pragmas { INSERT INTO abc SELECT * FROM abc; } # File has grown - showing there was a cache-spill - but there - # have been no calls to fsync(): - list [file size test.db] [nSync] - } {31744 0} + # have been no calls to fsync(). The file is probably about 30KB. + # But some VFS implementations (symbian) buffer writes so the actual + # size may be a little less than that. So this test case just tests + # that the file is now greater than 20000 bytes in size. + list [expr [file size test.db]>20000] [nSync] + } {1 0} do_test io-3.3 { # The COMMIT requires a single fsync() - to the database file. execsql { COMMIT } @@ -492,21 +495,26 @@ do_test io-4.3.3 { } file exists test.db-journal } {1} -do_test io-4.3.4 { - # The UPDATE statement in the statement above modifies 41 pages - # (all pages in the database except page 1 and the root page of - # abc). Because the cache_size is set to 10, this must have required - # at least 4 cache-spills. If there were no journal headers written - # to the journal file after the cache-spill, then the size of the - # journal file is give by: - # - # = + nPage * ( + 8) - # - # If the journal file contains additional headers, this formula - # will not predict the size of the journal file. - # - file size test.db-journal -} [expr 512 + (1024+8)*41] +if {$tcl_platform(platform) != "symbian"} { + # This test is not run on symbian because the file-buffer makes it + # difficult to predict the exact size of the file as reported by + # [file size]. + do_test io-4.3.4 { + # The UPDATE statement in the statement above modifies 41 pages + # (all pages in the database except page 1 and the root page of + # abc). Because the cache_size is set to 10, this must have required + # at least 4 cache-spills. If there were no journal headers written + # to the journal file after the cache-spill, then the size of the + # journal file is give by: + # + # = + nPage * ( + 8) + # + # If the journal file contains additional headers, this formula + # will not predict the size of the journal file. + # + file size test.db-journal + } [expr 512 + (1024+8)*41] +} #---------------------------------------------------------------------- # Test cases io-5.* test that the default page size is selected and -- 2.47.2