From: dan Date: Mon, 5 Feb 2018 13:28:51 +0000 (+0000) Subject: Update test file walro2.test to account for systems with a page-size X-Git-Tag: version-3.23.0~153 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=60d72b9baba2ee0938324fb5e2d68d97dab27ffb;p=thirdparty%2Fsqlite.git Update test file walro2.test to account for systems with a page-size (getpagesize()) larger than 32KB. FossilOrigin-Name: d9e59cfb8476e1ec1ca458b8382172526c0557ab785f41e31971d03045c9344c --- diff --git a/manifest b/manifest index fd2eb50f21..53c8e27ad1 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C In\sthe\sCLI,\nmake\ssure\ssqlite3_initialize()\sis\scalled\scorrectly\seven\sfor\snon-UTF8\shosts. -D 2018-02-04T20:33:13.165 +C Update\stest\sfile\swalro2.test\sto\saccount\sfor\ssystems\swith\sa\spage-size\n(getpagesize())\slarger\sthan\s32KB. +D 2018-02-05T13:28:51.262 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F Makefile.in 7a3f714b4fcf793108042b7b0a5c720b0b310ec84314d61ba7f3f49f27e550ea @@ -1555,7 +1555,7 @@ F test/waloverwrite.test dad2f26567f1b45174e54fbf9a8dc1cb876a7f03 F test/walpersist.test 8c6b7e3ec1ba91b5e4dc4e0921d6d3f87cd356a6 F test/walprotocol.test a112aba0b79e3adeaa485fed09484b32c654e97df58e454aa8489ac2cd57bf84 F test/walro.test cb438d05ba0d191f10b688e39c4f0cd5b71569a1d1f4440e5bdf3c6880e08c20 -F test/walro2.test 6c73e8e4b5ccc55f907f4603ba36458b45c085fb6dfb04f30e3c0babbc1c2f41 +F test/walro2.test ff7e493ce65a4dadf878d89aab4c385f8ddd3c1919333a18890013fce3feeb68 F test/walrofault.test c70cb6e308c443867701856cce92ad8288cd99488fa52afab77cca6cfd51af68 F test/walshared.test 0befc811dcf0b287efae21612304d15576e35417 F test/walslow.test c05c68d4dc2700a982f89133ce103a1a84cc285f @@ -1704,7 +1704,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 63a914410b5750bd08836864ae456ff09549487c5ce49706fedffa3d4f973059 -R e1e5372ebf3735de49eb34feee943e70 -U drh -Z 839d4cdabfa93aa0b085a28f8c75bf19 +P a3591fb54178b8f124207ff16e3ef9e58a62585feb3a56ced2b862222aea19d8 +R 6c73de726d0398e2d66d996a80d76264 +U dan +Z ca72fcd07de53b3665abd69681f9d461 diff --git a/manifest.uuid b/manifest.uuid index 80271b1207..486bb16f75 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -a3591fb54178b8f124207ff16e3ef9e58a62585feb3a56ced2b862222aea19d8 \ No newline at end of file +d9e59cfb8476e1ec1ca458b8382172526c0557ab785f41e31971d03045c9344c \ No newline at end of file diff --git a/test/walro2.test b/test/walro2.test index 1c51e91ec5..248acf86cb 100644 --- a/test/walro2.test +++ b/test/walro2.test @@ -39,6 +39,18 @@ proc copy_to_test2 {bZeroShm} { } } +# Most systems allocate the *-shm file in 32KB trunks. But on UNIX systems +# for which the getpagesize() call returns greater than 32K, the *-shm +# file is allocated in page-sized units (since you cannot mmap part of +# a page). The following code sets variable $MINSHMSZ to the smallest +# possible *-shm file (i.e. the greater of 32KB and the system page-size). +# +do_execsql_test 0.0 { + PRAGMA journal_mode = wal; + CREATE TABLE t1(x); +} +set MINSHMSZ [file size test.db-shm] + foreach bZeroShm {0 1} { set TN [expr $bZeroShm+1] do_multiclient_test tn { @@ -169,7 +181,7 @@ do_multiclient_test tn { } {a b c d e f g h 1 2} do_test $TN.3.2.2 { list [file size test.db-wal] [file size test.db-shm] - } {0 32768} + } [list 0 $MINSHMSZ] do_test $TN.3.3.0 { code2 { sqlite3 db2 test.db } @@ -182,7 +194,7 @@ do_multiclient_test tn { code2 { db2 close } code1 { db close } list [file size test.db-wal] [file size test.db-shm] - } [list [wal_file_size 4 1024] 32768] + } [list [wal_file_size 4 1024] $MINSHMSZ] do_test $TN.3.3.1 { code1 { sqlite3 db file:test.db?readonly_shm=1 } sql1 { SELECT * FROM t1 } @@ -196,7 +208,7 @@ do_multiclient_test tn { } code2 { db2 close } list [file size test.db-wal] [file size test.db-shm] - } [list [wal_file_size 4 1024] 32768] + } [list [wal_file_size 4 1024] $MINSHMSZ] do_test $TN.3.3.3 { sql1 { SELECT * FROM t1 } } {i ii}