]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix various problems in test scripts preventing "make test" from passing on
authordan <dan@noemail.net>
Sat, 13 Jan 2018 13:21:04 +0000 (13:21 +0000)
committerdan <dan@noemail.net>
Sat, 13 Jan 2018 13:21:04 +0000 (13:21 +0000)
F2FS file-systems with the "atomic-write" feature. Cherrypick of [56d93d07].

FossilOrigin-Name: 6a296d4d4d326f34f104a6632008050d1fff0e55118a428bc2df15cdef773b22

25 files changed:
manifest
manifest.uuid
test/crash8.test
test/delete_db.test
test/exclusive.test
test/fallocate.test
test/journal1.test
test/journal3.test
test/jrnlmode.test
test/jrnlmode2.test
test/lock4.test
test/pager1.test
test/pager3.test
test/rollback.test
test/sharedA.test
test/stmt.test
test/symlink.test
test/sync.test
test/sync2.test
test/tempdb.test
test/tkt3457.test
test/vacuum5.test
test/wal2.test
test/walmode.test
test/zerodamage.test

index 0e94ba7c94850e5bcf5bbb1acd8ac7d109499d78..001dc567d776f974026eccc77eaea26a7970e72f 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Version\s3.19.4
-D 2017-08-18T19:28:12.532
+C Fix\svarious\sproblems\sin\stest\sscripts\spreventing\s"make\stest"\sfrom\spassing\son\nF2FS\sfile-systems\swith\sthe\s"atomic-write"\sfeature.\sCherrypick\sof\s[56d93d07].
+D 2018-01-13T13:21:04.534
 F Makefile.in 1cc758ce3374a32425e4d130c2fe7b026b20de5b8843243de75f087c0a2661fb
 F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
 F Makefile.msc 8eeb80162074004e906b53d7340a12a14c471a83743aab975947e95ce061efcc
@@ -638,7 +638,7 @@ F test/crash4.test fe2821baf37168dc59dd733dcf7dba2a401487bc
 F test/crash5.test 05dd3aa9dbb751a22d5cdaf22a9c49b6667aa219
 F test/crash6.test 4c56f1e40d0291e1110790a99807aa875b1647ba
 F test/crash7.test 1a194c4900a255258cf94b7fcbfd29536db572df
-F test/crash8.test a63907617d8e74fb54b4bff23eca8a4435625245
+F test/crash8.test 64e464f22883be5184535a9620eb9070027073610d997bd2784227ca9564fb84
 F test/crashM.test d95f59046fa749b0d0822edf18a717788c8f318d
 F test/crashtest1.c 09c1c7d728ccf4feb9e481671e29dda5669bbcc2
 F test/createtab.test b5de160630b209c4b8925bdcbbaf48cc90b67fe8
@@ -656,7 +656,7 @@ F test/delete.test acc38fca8ee4851467705b1c2cfea64cd26667e5
 F test/delete2.test 3a03f2cca1f9a67ec469915cb8babd6485db43fa
 F test/delete3.test 555e84a00a99230b7d049d477a324a631126a6ab
 F test/delete4.test 21d2113217eeaacac2d99defe14fe6611615ae86
-F test/delete_db.test c70a43629dd4d3e1dd03fdaf7a22153af6a69d92
+F test/delete_db.test 096d828493c7907f9ea11a7098ea6a0f73edba89406487d5d6cc2228dc4ab8b0
 F test/descidx1.test 6d03b44c8538fe0eb4924e19fba10cdd8f3c9240
 F test/descidx2.test 9f1a0c83fd57f8667c82310ca21b30a350888b5d
 F test/descidx3.test 09ddbe3f5295f482d2f8b687cf6db8bad7acd9a2
@@ -697,14 +697,14 @@ F test/enc4.test c8f1ce3618508fd0909945beb8b8831feef2c020
 F test/eqp.test 3fe051af50921284189d1970eb653f9fcf5117d2
 F test/errmsg.test f31592a594b44ee121371d25ddd5d63497bb3401
 F test/eval.test a64c9105d6ff163df7cf09d6ac29cdad5922078c
-F test/exclusive.test 9a57bd66e39144b888ca75c309914fcdefb4e3f9
+F test/exclusive.test 1206b87e192497d78c7f35552e86a9d05421498da300fb1cce5ca5351ccde3c3
 F test/exclusive2.test 984090e8e9d1b331d2e8111daf6e5d61dda0bef7
 F test/exec.test e949714dc127eaa5ecc7d723efec1ec27118fdd7
 F test/exists.test 79a75323c78f02bbe9c251ea502a092f9ef63dac
 F test/expr.test 66a2c9ac34f74f036faa4092f5402c7d3162fc93
 F test/extension01.test 00d13cec817f331a687a243e0e5a2d87b0e358c9
 F test/extraquick.test cb254400bd42bfb777ff675356aabf3287978f79
-F test/fallocate.test 87b5e43c872b7e69cd80b7b8813eb102b571a75d45dda24e38b65537bcc85733
+F test/fallocate.test 07416bd593a116d5893cb244f45a94d5c6fe030561df3bd972e6135f8106e509
 F test/filectrl.test 6e871c2d35dead1d9a88e176e8d2ca094fec6bb3
 F test/filefmt.test e4edbdc637ca9576ccf4337a3cce627d9df7a56c
 F test/fkey1.test ba64806ff9a04eecab2679caad377ae99a5e94e4
@@ -913,11 +913,11 @@ F test/join3.test 6f0c774ff1ba0489e6c88a3e77b9d3528fb4fda0
 F test/join4.test 1a352e4e267114444c29266ce79e941af5885916
 F test/join5.test bc98ea4b4e5003f5b1453701ebb8cd7d1c01a550
 F test/join6.test cfe6503791ceb0cbb509966740286ec423cbf10b
-F test/journal1.test 69abc726c51b4a0409189f9a85191205297c0577
+F test/journal1.test c7b768041b7f494471531e17abc2f4f5ebf9e5096984f43ed17c4eb80ba34497
 F test/journal2.test 9dac6b4ba0ca79c3b21446bbae993a462c2397c4
-F test/journal3.test ff8af941f9e06161d3db1b46bb9f965ff0e7f307
-F test/jrnlmode.test 7864d59cf7f6e552b9b99ba0f38acd167edc10fa
-F test/jrnlmode2.test 81610545a4e6ed239ea8fa661891893385e23a1d
+F test/journal3.test c9c29883f5bf535ae82ae21c472df6263806a22e467b6db7cd0d6d545305b4f6
+F test/jrnlmode.test a6693f2bed4541a21e703aaa37bb3e10de154130645952933b82b2dec0a8b539
+F test/jrnlmode2.test 8759a1d4657c064637f8b079592651530db738419e1d649c6df7048cd724363d
 F test/jrnlmode3.test 556b447a05be0e0963f4311e95ab1632b11c9eaa
 F test/json101.test 2bd3703a8566e39f8efee8b83bb60aac363fa312e69c94b4024114e0fe77e380
 F test/json102.test eeb54efa221e50b74a2d6fb9259963b48d7414dca3ce2fdfdeed45cb28487bc1
@@ -937,7 +937,7 @@ F test/loadext2.test 0408380b57adca04004247179837a18e866a74f7
 F test/lock.test be4fe08118fb988fed741f429b7dd5d65e1c90db
 F test/lock2.test 5242d8ac4e2d59c403aebff606af449b455aceff
 F test/lock3.test f271375930711ae044080f4fe6d6eda930870d00
-F test/lock4.test e175ae13865bc87680607563bafba21f31a26f12
+F test/lock4.test 27143363eda1622f03c133efc8db808fc331afd973486cb571ea71cd717d37b8
 F test/lock5.test c6c5e0ebcb21c61a572870cc86c0cb9f14cede38
 F test/lock6.test ad5b387a3a8096afd3c68a55b9535056431b0cf5
 F test/lock7.test 49f1eaff1cdc491cc5dee3669f3c671d9f172431
@@ -1023,9 +1023,9 @@ F test/oserror.test b32dc34f2363ef18532e3a0a7358e3e7e321974f
 F test/ossfuzz.c f5abed3177f719df3c3109901fcdd26b9fb7f581c8da50fc26f3a81ddfb2c2ae
 F test/ossshell.c 296ab63067841bd1b1e97b46a0b2af48ee7f69d50d1a723008bee12dd7122622
 F test/ovfl.test 199c482696defceacee8c8e0e0ef36da62726b2f
-F test/pager1.test 841868017e9dd3cb459b8d78862091a7d9cff21d
+F test/pager1.test 9475f2a48c5b86ae15ef48a420939e0ae744bc5cb688de8aba64120694d18cb8
 F test/pager2.test 67b8f40ae98112bcdba1f2b2d03ea83266418c71
-F test/pager3.test 3856d9c80839be0668efee1b74811b1b7f7fc95f
+F test/pager3.test 4e9a83d6ca0838d7c602c9eb93d1357562d9059c1e02ffb138a8271020838370
 F test/pager4.test a122e9e6925d5b23b31e3dfef8c6a44bbf19590e
 F test/pagerfault.test 42ff797b1e6426c141cc7ee8b7417c9f27427950
 F test/pagerfault2.test caf4c7facb914fd3b03a17b31ae2b180c8d6ca1f
@@ -1062,7 +1062,7 @@ F test/regexp2.test 40e894223b3d6672655481493f1be12012f2b33c
 F test/reindex.test 44edd3966b474468b823d481eafef0c305022254
 F test/releasetest.tcl 936c8b9c72d46a86d0f9d65c536e883c2d79a8f53a5324283757bfc9d8b5a656 x
 F test/resolver01.test f4022acafda7f4d40eca94dbf16bc5fc4ac30ceb
-F test/rollback.test f580934279800d480a19176c6b44909df31ce7ad45267ea475a541daa522f3d3
+F test/rollback.test 06680159bc6746d0f26276e339e3ae2f951c64812468308838e0a3362d911eaa
 F test/rollback2.test 8435d6ff0f13f51d2a4181c232e706005fa90fc5
 F test/rollbackfault.test 0e646aeab8840c399cfbfa43daab46fd609cf04a
 F test/rowallock.test 3f88ec6819489d0b2341c7a7528ae17c053ab7cc
@@ -1121,7 +1121,7 @@ F test/shared6.test 866bb4982c45ce216c61ded5e8fde4e7e2f3ffa9
 F test/shared7.test a81e99f83e6c51b02ac99c96fb3a2a7b5978c956
 F test/shared8.test 00a07bf5e1337ecf72e94542bdefdc330d7a2538
 F test/shared9.test 5f2a8f79b4d6c7d107a01ffa1ed05ae7e6333e21
-F test/sharedA.test 0cdf1a76dfa00e6beee66af5b534b1e8df2720f5
+F test/sharedA.test 49d87ec54ab640fbbc3786ee3c01de94aaa482a3a9f834ad3fe92770eb69e281
 F test/sharedB.test 16cc7178e20965d75278f410943109b77b2e645e
 F test/shared_err.test 2f2aee20db294b9924e81f6ccbe60f19e21e8506
 F test/sharedlock.test 5ede3c37439067c43b0198f580fd374ebf15d304
@@ -1169,7 +1169,7 @@ F test/sqllimits1.test a74ee2a3740b9f9c2437c246d8fb77354862a142
 F test/sqllog.test 6af6cb0b09f4e44e1917e06ce85be7670302517a
 F test/stat.test f8f1279ffffabe6df825723af18cc6e0ae70a893
 F test/statfault.test f525a7bf633e50afd027700e9a486090684b1ac1
-F test/stmt.test 64844332db69cf1a735fcb3e11548557fc95392f
+F test/stmt.test 54ed2cc0764bf3e48a058331813c3dbd19fc1d0827c3d8369914a5d8f564ec75
 F test/subjournal.test 2121a93ef3d3e83d52bf236c8a02aef4009fbf52884754104b2b6cad9a041095
 F test/subquery.test d7268d193dd33d5505df965399d3a594e76ae13f
 F test/subquery2.test 438f8a7da1457277b22e4176510f7659b286995f
@@ -1177,9 +1177,9 @@ F test/subselect.test 0966aa8e720224dbd6a5e769a3ec2a723e332303
 F test/substr.test 18f57c4ca8a598805c4d64e304c418734d843c1a
 F test/subtype1.test 7fe09496352f97053af1437150751be2d0a0cae8
 F test/superlock.test ec94f0556b6488d97f71c79f9061ae08d9ab8f12
-F test/symlink.test c9ebe7330d228249e447038276bfc8a7b22f4849
-F test/sync.test 2f84bdbc2b2df1fcb0220575b4b9f8cea94b7529
-F test/sync2.test 6be8ed007fa063b147773c1982b5bdba97a32badc536bdc6077eff5cf8710ece
+F test/symlink.test 0d816670325536b8973ec08d32b45136baddb80bd45fd178e0ce7a9e8153f3e7
+F test/sync.test 89539f4973c010eda5638407e71ca7fddbcd8e0594f4c9980229f804d4333092
+F test/sync2.test 8f9f7d4f6d5be8ca8941a8dadcc4299e558cb6a1ff653a9469146c7a76ef2039
 F test/syscall.test 26f05bc237853a7588b9a4c9111aacb8cdd32d2562c36fee7d9dfc4731c6c329
 F test/sysfault.test c9f2b0d8d677558f74de750c75e12a5454719d04
 F test/tabfunc01.test 699251cb99651415218a891384510a685c7ab012
@@ -1187,7 +1187,7 @@ F test/table.test b708f3e5fa2542fa51dfab21fc07b36ea445cb2f
 F test/tableapi.test 2674633fa95d80da917571ebdd759a14d9819126
 F test/tableopts.test dba698ba97251017b7c80d738c198d39ab747930
 F test/tclsqlite.test 1d73b9203b1ca8798d7d7310742b8d3febc0d56e
-F test/tempdb.test bd92eba8f20e16a9136e434e20b280794de3cdb6
+F test/tempdb.test 4cdaa23ddd8acb4d79cbb1b68ccdfd09b0537aaba909ca69a876157c2a2cbd08
 F test/tempdb2.test 27e41ed540b2f9b056c2e77e9bddc1b875358507
 F test/tempfault.test 0c0d349c9a99bf5f374655742577f8712c647900
 F test/temptable.test d2c9b87a54147161bcd1822e30c1d1cd891e5b30
@@ -1314,7 +1314,7 @@ F test/tkt3357.test 77c37c6482b526fe89941ce951c22d011f5922ed
 F test/tkt3419.test 1bbf36d7ea03b638c15804251287c2391f5c1f6b
 F test/tkt3424.test 61f831bd2b071bd128fa5d00fbda57e656ca5812
 F test/tkt3442.test 53840ec5325bb94544792aad4c20476f81dc26b1
-F test/tkt3457.test 44e980fe5334753dcc27b94fa4deabc485a92f74
+F test/tkt3457.test 5651e2cbb94645b677ec663160b9e192b87b7d365aecdfb24e19f749575a6fc2
 F test/tkt3461.test 228ea328a5a21e8663f80ee3d212a6ad92549a19
 F test/tkt3493.test 1686cbde85f8721fc1bdc0ee72f2ef2f63139218
 F test/tkt3508.test d75704db9501625c7f7deec119fcaf1696aefb7d
@@ -1395,7 +1395,7 @@ F test/vacuum.test ce91c39f7f91a4273bf620efad21086b5aa6ef1d
 F test/vacuum2.test aa048abee196c16c9ba308465494009057b79f9b
 F test/vacuum3.test 77ecdd54592b45a0bcb133339f99f1ae0ae94d0d
 F test/vacuum4.test d3f8ecff345f166911568f397d2432c16d2867d9
-F test/vacuum5.test c87234e8ca4107f349da4edbeda3e4ea5adc93f3
+F test/vacuum5.test 263b144d537e92ad8e9ca8a73cc6e1583f41cfd0dda9432b87f7806174a2f48c
 F test/vacuummem.test 7b42abb3208bd82dd23a7536588396f295a314f2
 F test/varint.test ab7b110089a08b9926ed7390e7e97bdefeb74102
 F test/veryquick.test 57ab846bacf7b90cf4e9a672721ea5c5b669b661
@@ -1421,7 +1421,7 @@ F test/vtab_alter.test 9e374885248f69e251bdaacf480b04a197f125e5
 F test/vtab_err.test 0d4d8eb4def1d053ac7c5050df3024fd47a3fbd8
 F test/vtab_shared.test 5253bff2355a9a3f014c15337da7e177ab0ef8ad
 F test/wal.test 613efec03e517e1775d86b993a54877d2e29a477
-F test/wal2.test 56b0bc95b8693a0be294f8d210c49025dd094bd7
+F test/wal2.test 028f02193dfb9045ea16e87a260f3b58b4779f00354521482724c4cf914883ac
 F test/wal3.test 2a93004bc0fb2b5c29888964024695bade278ab2
 F test/wal4.test 4744e155cd6299c6bd99d3eab1c82f77db9cdb3c
 F test/wal5.test 9c11da7aeccd83a46d79a556ad11a18d3cb15aa9
@@ -1441,7 +1441,7 @@ F test/walcrash3.test e426aa58122d20f2b9fbe9a507f9eb8cab85b8af
 F test/walcrash4.test e7b6e7639a950a0cca8e210e248c8dad4d63bf20
 F test/walfault.test 1f8389f7709877e9b4cc679033d71d6fe529056b
 F test/walhook.test ed00a40ba7255da22d6b66433ab61fab16a63483
-F test/walmode.test 4022fe03ae6e830583672caa101f046438a0473c
+F test/walmode.test cd6e7cff618eaaa5910ce57c3657aa50110397f86213886a2400afb9bfec7b7b
 F test/walnoshm.test 84ca10c544632a756467336b7c3b864d493ee496
 F test/waloverwrite.test dad2f26567f1b45174e54fbf9a8dc1cb876a7f03
 F test/walpersist.test 8c6b7e3ec1ba91b5e4dc4e0921d6d3f87cd356a6
@@ -1490,7 +1490,7 @@ F test/without_rowid6.test 1f99644e6508447fb050f73697350c7ceca3392e
 F test/wordcount.c 06efb84b7c48a4973c2c24ea06c93d00bce24389
 F test/writecrash.test f1da7f7adfe8d7f09ea79b42e5ca6dcc41102f27f8e334ad71539501ddd910cc
 F test/zeroblob.test 3857870fe681b8185654414a9bccfde80b62a0fa
-F test/zerodamage.test e59a56443d6298ecf7435f618f0b27654f0c849e
+F test/zerodamage.test 9c41628db7e8d9e8a0181e59ea5f189df311a9f6ce99cc376dc461f66db6f8dc
 F tool/GetFile.cs a15e08acb5dd7539b75ba23501581d7c2b462cb5
 F tool/GetTclKit.bat 6afa640edc7810725aec61c3076ac617c4aaf0b7
 F tool/Replace.cs 02c67258801c2fb5f63231e0ac0f220b4b36ba91
@@ -1582,10 +1582,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
 F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 2dd0c77d54b333beee48c250e61c0002a03d34c5d4da07040ac414bdd36f56f9
-R adc24053e8a51cfd84ae03ddcbebf119
-T +bgcolor * #d0c0ff
-T +sym-release *
-T +sym-version-3.19.4 *
-U drh
-Z d2d4d8a49d6f397a222a788afe073795
+P 605907e73adb4533b12d22be8422f17a8dc125b5c37bb391756a11fc3a8c4d10
+Q +56d93d070d6b92d8a5a3fec1b09aae8911116c73d072fc5022f0b51668ed996b
+R 42cae1f02fcb9ccc20a10a90507b22db
+U dan
+Z 1b0a5b5324bf67537a5afbc88e5cdd1c
index fd57d457264ca81eeb443c6c9f13e7710a86c09e..832839713b4990c51f1422c91079528904a8262a 100644 (file)
@@ -1 +1 @@
-605907e73adb4533b12d22be8422f17a8dc125b5c37bb391756a11fc3a8c4d10
\ No newline at end of file
+6a296d4d4d326f34f104a6632008050d1fff0e55118a428bc2df15cdef773b22
\ No newline at end of file
index f3b6f6e244f34a4bb251d2a1ef30cda73dc18ce3..2c6487b38ba882aefdc0ad8c4ec6fd6595e11180 100644 (file)
@@ -142,6 +142,7 @@ proc write_file {zFile zData} {
 #    b) Less than 512, or
 #    c) Greater than SQLITE_MAX_PAGE_SIZE
 #
+if {[atomic_batch_write test.db]==0} {
 do_test crash8-3.1 {
   list [file exists test.db-joural] [file exists test.db]
 } {0 1}
@@ -228,6 +229,7 @@ do_test crash8-3.11 {
     PRAGMA integrity_check
   }
 } {6 ok}
+}
 
 
 # If a connection running in persistent-journal mode is part of a 
@@ -266,8 +268,12 @@ ifcapable pragma {
       UPDATE aux.ab SET b = randstr(1000,1000) WHERE a>=1;
       UPDATE ab SET b = randstr(1000,1000) WHERE a>=1;
     }
-    list [file exists test.db-journal] [file exists test2.db-journal]
-  } {1 1}
+  } {persist persist}
+  if {[atomic_batch_write test.db]==0} {
+    do_test crash8.4.1.1 {
+      list [file exists test.db-journal] [file exists test2.db-journal]
+    } [list $bJrnl $bJrnl]
+  }
 
   do_test crash8-4.2 {
     execsql {
index 09c44ff9f397ed6ca0fc529ea06c6b4d8b3cc01a..6edd9c242e01d5502d16200eba95b1a59a52dd3b 100644 (file)
@@ -17,6 +17,11 @@ set testdir [file dirname $argv0]
 source $testdir/tester.tcl
 set testprefix delete_db
 
+if {[atomic_batch_write test.db]} {
+  finish_test
+  return
+}
+
 proc delete_all {} {
   foreach f [glob -nocomplain test2*] { file delete $f }
   foreach f [glob -nocomplain test3*] { file delete $f }
index 45f931820548183edb4cfe2833cff2c58045c967..04de52913732b3ccc8528c011e00b3dc34b22cf0 100644 (file)
@@ -252,7 +252,9 @@ db2 close
 # opens the journal file for exclusive access, preventing its contents 
 # from being inspected externally.
 #
-if {$tcl_platform(platform) != "windows"} {
+if {$tcl_platform(platform) != "windows"
+ && [atomic_batch_write test.db]==0
+} {
 
   # Return a list of two booleans (either 0 or 1). The first is true
   # if the named file exists. The second is true only if the file
@@ -391,6 +393,7 @@ do_test exclusive-4.5 {
 # Tests exclusive-5.X - test that statement journals are truncated
 # instead of deleted when in exclusive access mode.
 #
+if {[atomic_batch_write test.db]==0} {
 
 # Close and reopen the database so that the temp database is no
 # longer active.
@@ -508,4 +511,6 @@ do_execsql_test exclusive-6.5 {
   SELECT * FROM sqlite_master;
 } {exclusive}
 
+} ;# atomic_batch_write==0
+
 finish_test
index 63d88ea8851f45d64df943b4f2493c1748859e2a..0c971c08c1936e92beb755336186e5390f1bc1e3 100644 (file)
@@ -61,6 +61,7 @@ do_test fallocate-1.7 {
   execsql { BEGIN; INSERT INTO t1 VALUES(1, 2); }
   if {[permutation] != "inmemory_journal"
    && [permutation] != "atomic-batch-write"
+   && [atomic_batch_write test.db]==0
   } {
     hexio_get_int [hexio_read test.db-journal 16 4]
   } else {
index c89dd2b4c9e073951c2c6af796e17f11e49a5097..bcbafe30f68748cdd174524b4bb513d1635fed60 100644 (file)
@@ -22,7 +22,12 @@ source $testdir/tester.tcl
 # These tests will not work on windows because windows uses
 # manditory file locking which breaks the copy_file command.
 #
-if {$tcl_platform(platform)=="windows"} {
+# Or with atomic_batch_write systems, as journal files are
+# not created.
+#
+if {$tcl_platform(platform)=="windows"
+ || [atomic_batch_write test.db]
+} {
   finish_test
   return
 }
index 939cc27c7084b029a8173d69e9881b5b5bcd2609..b907352329aacfee0fe1e272f0089ae7c2db529c 100644 (file)
@@ -20,7 +20,9 @@ source $testdir/malloc_common.tcl
 # If a connection is required to create a journal file, it creates it with 
 # the same file-system permissions as the database file itself. Test this.
 #
-if {$::tcl_platform(platform) == "unix"} {
+if {$::tcl_platform(platform) == "unix"
+ && [atomic_batch_write test.db]==0
+} {
 
   # Changed on 2012-02-13:  umask is deliberately ignored for -wal, -journal,
   # and -shm files.
index 2ba56f2b00a95d821cfae2d704dc4c1291fdaac6..3112f6184e5b81dfcf12c7e705c2bfe564414b69 100644 (file)
@@ -302,6 +302,7 @@ ifcapable autovacuum&&pragma {
 # The following test caes, jrnlmode-5.*, test the journal_size_limit
 # pragma.
 ifcapable pragma {
+if {[atomic_batch_write test.db]==0} {
   db close
   forcedelete test.db test2.db test3.db
   sqlite3 db test.db
@@ -454,8 +455,10 @@ ifcapable pragma {
     list [file exists test.db-journal] [file size test.db-journal]
   } {1 0}
 }
+}
 
 ifcapable pragma {
+if {[atomic_batch_write test.db]==0} {
   # These tests are not run as part of the "journaltest" permutation,
   # as the test_journal.c layer is incompatible with in-memory journaling.
   if {[permutation] ne "journaltest"} {
@@ -507,6 +510,7 @@ ifcapable pragma {
     } {0}
   }
 }
+}
 
 ifcapable pragma {
   catch { db close }
index 6ea87d704b3f8c933dd1958fdce501c752cb8bc0..6cc54dc5dfa8ec3ff06f929e0f91414cfaeea522 100644 (file)
@@ -18,6 +18,11 @@ ifcapable {!pager_pragmas} {
   return
 }
 
+if {[atomic_batch_write test.db]} {
+  finish_test
+  return
+}
+
 #-------------------------------------------------------------------------
 # The tests in this file check that the following two bugs (both now fixed)
 # do not reappear.
index b0b1c74fbec6186ec5277efabc3a79e7c30fa761..58dd206997be56c7b67270ed98389596eed49496 100644 (file)
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
 
+if {[atomic_batch_write test.db]} {
+  # This test uses two processes, one of which blocks until the other
+  # creates a *-journal file. Which doesn't work if atomic writes are
+  # available.
+  finish_test
+  return
+}
+
 do_not_use_codec
 
 # Initialize the test.db database so that it is non-empty
index c25c837b670b9cebb416b64d8f81b8468f1a0944..00c761578b2b8572ad998ecadeadfd72449721f6 100644 (file)
@@ -17,6 +17,11 @@ source $testdir/malloc_common.tcl
 source $testdir/wal_common.tcl
 set testprefix pager1
 
+if {[atomic_batch_write test.db]} {
+  finish_test
+  return
+}
+
 # Do not use a codec for tests in this file, as the database file is
 # manipulated directly using tcl scripts (using the [hexio_write] command).
 #
index 23435a79b759ec999cf56ce1f28f24a321154645..e815f2788b36c7c29acd2c63b5bea37a6cc1252c 100644 (file)
@@ -16,6 +16,10 @@ source $testdir/lock_common.tcl
 source $testdir/malloc_common.tcl
 source $testdir/wal_common.tcl
 
+if {[atomic_batch_write test.db]} {
+  finish_test
+  return
+}
 
 foreach {tn sql res j} {
   1 "PRAGMA journal_mode = DELETE"  delete        0
index 60a619031709a3e33531d46bbd90d138fc01d8e4..423bf20fce3c16041f42be6af54b7908e94a5ea9 100644 (file)
@@ -83,6 +83,7 @@ if {$tcl_platform(platform) == "unix"
  && [permutation] ne "onefile"
  && [permutation] ne "inmemory_journal"
  && [permutation] ne "atomic-batch-write"
+ && [atomic_batch_write test.db]==0
 } {
   do_test rollback-2.1 {
     execsql {
index 146fb26be0ed3e5aec5ab82ecc76ee6b4a243ca1..55ed5749bb1c68f968d3dc155110a3389e289f10 100644 (file)
@@ -19,6 +19,11 @@ if {[run_thread_tests]==0} { finish_test ; return }
 db close
 set ::testprefix sharedA
 
+if {[atomic_batch_write test.db]} {
+  finish_test
+  return
+}
+
 set ::enable_shared_cache [sqlite3_enable_shared_cache 1]
 
 #-------------------------------------------------------------------------
index df501f76547024eeffe778644242f2e06cc4669c..138ce19860e8ddab7342bcfc3b81f0eb66c9e819 100644 (file)
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
 
+if {[atomic_batch_write test.db]} {
+  finish_test
+  return
+}
+
 do_test stmt-1.1 {
   execsql { CREATE TABLE t1(a integer primary key, b INTEGER NOT NULL) }
 } {}
index 949102cf8ad24fb2e6e462b785d7457f9cef7bd4..4695b29fa020a4c33050576d0181f1a03c660d95 100644 (file)
@@ -102,7 +102,7 @@ foreach {tn f} {1 test.db2 2 test.db3} {
         INSERT INTO t1 VALUES(1);
     } db2
     file exists test.db-journal
-  } 1
+  } [expr [atomic_batch_write test.db]==0]
   do_test 2.$tn.3 {
     list [file exists test2.db-journal] [file exists test3.db-journal]
   } {0 0}
index 210039acb5b7ace866ea5046ecf7ca050aa706c9..023425e6b1dac6b540ff6fce7c747e3f7db26d5c 100644 (file)
@@ -26,6 +26,10 @@ ifcapable !pager_pragmas||!attach {
   finish_test
   return
 }
+if {[atomic_batch_write test.db]} {
+  finish_test
+  return
+}
 
 set sqlite_sync_count 0
 proc cond_incr_sync_count {adj} {
index 46e8bc72fb8e2c5202df15f00f4537916d989e0d..89e66c84552700f174b813a279795198896f730a 100644 (file)
@@ -29,6 +29,7 @@ ifcapable !pager_pragmas||!attach||!dirsync {
 if {$::tcl_platform(platform)!="unix" 
   || [permutation] == "journaltest"
   || [permutation] == "inmemory_journal"
+  || [atomic_batch_write test.db] 
 } {
   finish_test
   return
index 61416ec81c0cce1185f5eedd3e5dd26c4de3ce2d..a32ef06f445fe9f6ab820f10dbcc61bbefa0d5af 100644 (file)
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
 
+if {[atomic_batch_write test.db]} {
+  finish_test
+  return
+}
+
 # Use a temporary database.
 #
 db close
index 04757413221c16d0143da057d438d3f68c905f1c..24b4f0eac0f7a1b0e8d8421a16e59324da3a2ba7 100644 (file)
@@ -19,6 +19,10 @@ if {$tcl_platform(platform) != "unix"} {
   finish_test
   return
 }
+if {[atomic_batch_write test.db]} {
+  finish_test
+  return
+}
 
 #-----------------------------------------------------------------------
 # To roll back a hot-journal file, the application needs read and write 
index 8e76a9393c6e6460b307a75cd2b0c19f9404614d..f203fb87ba4f57f0b695e90654c63bff19b95bdd 100644 (file)
@@ -143,9 +143,11 @@ if {$::TEMP_STORE<3 && [permutation]!="inmemory_journal"} {
 
   db close
   tvfs delete
-  do_test 3.2 {
-    lrange $::openfiles 0 4
-  } {test.db test.db-journal test.db-journal {} test.db-journal}
+  if {[atomic_batch_write test.db]==0} {
+    do_test 3.2 {
+      lrange $::openfiles 0 4
+    } {test.db test.db-journal test.db-journal {} test.db-journal}
+  }
 } 
 
 
index 0b15b1546170beb339ab3d101553d9637ef5ad8f..a9b00ab8c539b49c830455541ffc44617d04e086 100644 (file)
@@ -582,15 +582,23 @@ do_test wal2-6.3.4 {
     BEGIN;
       INSERT INTO t1 VALUES('Groucho');
   }
-  list [file exists test.db-wal] [file exists test.db-journal]
-} {0 1}
+} {}
+if {[atomic_batch_write test.db]==0} {
+  do_test wal2-6.3.4.1 {
+    list [file exists test.db-wal] [file exists test.db-journal]
+  } {0 1}
+}
 do_test wal2-6.3.5 {
   execsql { PRAGMA lock_status }
 } {main exclusive temp closed}
 do_test wal2-6.3.6 {
   execsql { COMMIT }
-  list [file exists test.db-wal] [file exists test.db-journal]
-} {0 1}
+} {}
+if {[atomic_batch_write test.db]==0} {
+  do_test wal2-6.3.6.1 {
+    list [file exists test.db-wal] [file exists test.db-journal]
+  } {0 1}
+}
 do_test wal2-6.3.7 {
   execsql { PRAGMA lock_status }
 } {main exclusive temp closed}
index 4e14d54d4f71551a04f0f9a0d8aceb87ebf987a8..f760823c8d4980a0bdda5b70d81e0d18e02b6d8e 100644 (file)
@@ -45,15 +45,17 @@ do_test walmode-1.2 {
   file size test.db
 } {1024}
 
-set expected_sync_count 3
-if {$::tcl_platform(platform)!="windows"} {
-  ifcapable dirsync {
-    incr expected_sync_count
+if {[atomic_batch_write test.db]==0} {
+  set expected_sync_count 3
+  if {$::tcl_platform(platform)!="windows"} {
+    ifcapable dirsync {
+      incr expected_sync_count
+    }
   }
+  do_test walmode-1.3 {
+    set sqlite_sync_count
+  } $expected_sync_count
 }
-do_test walmode-1.3 {
-  set sqlite_sync_count
-} $expected_sync_count
 
 do_test walmode-1.4 {
   file exists test.db-wal
@@ -106,9 +108,11 @@ do_test walmode-4.1 {
   execsql { INSERT INTO t1 VALUES(1, 2) }
   execsql { PRAGMA journal_mode = persist }
 } {persist}
-do_test walmode-4.2 {
-  list [file exists test.db-journal] [file exists test.db-wal]
-} {1 0}
+if {[atomic_batch_write test.db]==0} {
+  do_test walmode-4.2 {
+    list [file exists test.db-journal] [file exists test.db-wal]
+  } {1 0}
+}
 do_test walmode-4.3 {
   execsql { SELECT * FROM t1 }
 } {1 2}
@@ -117,9 +121,11 @@ do_test walmode-4.4 {
   sqlite3 db test.db
   execsql { SELECT * FROM t1 }
 } {1 2}
-do_test walmode-4.5 {
-  list [file exists test.db-journal] [file exists test.db-wal]
-} {1 0}
+if {[atomic_batch_write test.db]==0} {
+  do_test walmode-4.5 {
+    list [file exists test.db-journal] [file exists test.db-wal]
+  } {1 0}
+}
 
 # Test that nothing goes wrong if a connection is prevented from changing
 # from WAL to rollback mode because a second connection has the database
index a87e50b7b5e8203b9a922028c08fe0c171cb8078..83bae737dfa25988ed9103dd7fc5cbceb27177cf 100644 (file)
@@ -74,7 +74,7 @@ do_test zerodamage-2.0 {
     UPDATE t1 SET y=randomblob(50) WHERE x=123;
   }
   concat [file_control_powersafe_overwrite db -1] [set ::max_journal_size]
-} {0 1 2576}
+} [list 0 1 [expr ([atomic_batch_write test.db]==0)*2576]]
 
 # Repeat the previous step with zero-damage turned off.  This time the
 # maximum rollback journal size should be much larger.
@@ -87,7 +87,7 @@ do_test zerodamage-2.1 {
     UPDATE t1 SET y=randomblob(50) WHERE x=124;
   }
   concat [file_control_powersafe_overwrite db -1] [set ::max_journal_size]
-} {0 0 24704}
+} [list 0 0 [expr ([atomic_batch_write test.db]==0)*24704]]
 
 if {[wal_is_capable]} {
   # Run a WAL-mode transaction with POWERSAFE_OVERWRITE on to verify that the