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

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

Issue 2751253002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: also clang on Linux i386 Created 3 years, 9 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/backup4.test ('k') | third_party/sqlite/src/test/bc_common.tcl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/backup_malloc.test
diff --git a/third_party/sqlite/src/test/backup_malloc.test b/third_party/sqlite/src/test/backup_malloc.test
index f556861fb199845123dd1a0562cacf24cb183039..5444a70bdf763101adfc4db6316ec42c2c8c4ad7 100644
--- a/third_party/sqlite/src/test/backup_malloc.test
+++ b/third_party/sqlite/src/test/backup_malloc.test
@@ -84,4 +84,36 @@ do_malloc_test backup_malloc-2 -tclprep {
db2 close
}
+reset_db
+do_execsql_test 3.0 {
+ PRAGMA page_size = 16384;
+ BEGIN;
+ CREATE TABLE t1(a, b);
+ INSERT INTO t1 VALUES(1, 2);
+ COMMIT;
+}
+
+do_faultsim_test 3 -faults oom* -prep {
+ catch { db close }
+ catch { db2 close }
+
+ forcedelete test2.db
+ sqlite3 db2 test2.db
+ sqlite3 db test.db
+ sqlite3_backup B db2 main db main
+} -body {
+
+ set rc [B step 50]
+ if {$rc == "SQLITE_NOMEM" || $rc == "SQLITE_IOERR_NOMEM"} {
+ error "out of memory"
+ }
+
+} -test {
+ faultsim_test_result {0 {}}
+ faultsim_integrity_check
+
+ # Finalize the backup.
+ catch { B finish }
+}
+
finish_test
« no previous file with comments | « third_party/sqlite/src/test/backup4.test ('k') | third_party/sqlite/src/test/bc_common.tcl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698