Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: third_party/sqlite/src/test/incrvacuum_ioerr.test

Issue 949043002: Add //third_party/sqlite to dirs_to_snapshot, remove net_sql.patch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/sqlite/src/test/incrvacuum3.test ('k') | third_party/sqlite/src/test/index.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/incrvacuum_ioerr.test
diff --git a/third_party/sqlite/src/test/incrvacuum_ioerr.test b/third_party/sqlite/src/test/incrvacuum_ioerr.test
index 47027b823bc1c6ab41e547ba43117018c7a75137..50f7fa2029b2041ad01110e9a3ab03b1358f856e 100644
--- a/third_party/sqlite/src/test/incrvacuum_ioerr.test
+++ b/third_party/sqlite/src/test/incrvacuum_ioerr.test
@@ -108,7 +108,7 @@ do_ioerr_test incrvacuum-ioerr-3 -start 1 -cksum 1 -tclprep {
ifcapable shared_cache {
catch { db close }
- file delete -force test.db
+ forcedelete test.db
set ::enable_shared_cache [sqlite3_enable_shared_cache 1]
# Create two connections to a single shared-cache:
@@ -139,8 +139,9 @@ ifcapable shared_cache {
# Figure out how big the database is and how many free pages it
# has before running incremental-vacuum.
#
- set nPage [expr {[file size test.db]/1024}]
set nFree [execsql {pragma freelist_count} db1]
+ set nPage [execsql {pragma page_count} db1]
+ puts "nFree=$nFree nPage=$nPage"
# Now run incremental-vacuum to vacuum 5 pages from the db file.
# The iTest'th I/O call is set to fail.
@@ -158,11 +159,11 @@ ifcapable shared_cache {
set ::sqlite_io_error_hardhit 0
set nFree2 [execsql {pragma freelist_count} db1]
- set nPage2 [expr {[file size test.db]/1024}]
+ set nPage2 [execsql {pragma page_count} db1]
do_test incrvacuum-ioerr-4.$iTest.2 {
set shrink [expr {$nPage-$nPage2}]
- expr {$shrink==0 || $shrink==5}
+ expr {$shrink==0 || $shrink==5 || ($nFree<5 && $shrink==$nFree)}
} {1}
do_test incrvacuum-ioerr-4.$iTest.3 {
« no previous file with comments | « third_party/sqlite/src/test/incrvacuum3.test ('k') | third_party/sqlite/src/test/index.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698