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

Unified Diff: third_party/sqlite/src/test/crash7.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/crash6.test ('k') | third_party/sqlite/src/test/crash8.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/crash7.test
diff --git a/third_party/sqlite/src/test/crash7.test b/third_party/sqlite/src/test/crash7.test
index fc0596a8aa90c85425d9ca0c281dbc42db28752f..482999cbfd9575921d5e6f5336f04e3143db101d 100644
--- a/third_party/sqlite/src/test/crash7.test
+++ b/third_party/sqlite/src/test/crash7.test
@@ -13,6 +13,7 @@
set testdir [file dirname $argv0]
source $testdir/tester.tcl
+set testprefix crash7
ifcapable !crashtest {
finish_test
@@ -26,7 +27,7 @@ proc signature {} {
foreach f [list test.db test.db-journal] {
for {set ii 1} {$ii < 64} {incr ii} {
db close
- file delete test.db
+ delete_file test.db
sqlite3 db test.db
set from_size [expr 1024 << ($ii&3)]
@@ -79,4 +80,37 @@ foreach f [list test.db test.db-journal] {
}
}
+db close
+forcedelete test.db
+sqlite3 db test.db
+do_execsql_test 2.0 {
+ CREATE TABLE t1(a, b, UNIQUE(a, b));
+ INSERT INTO t1 VALUES(randomblob(100), randomblob(100));
+ INSERT INTO t1 SELECT randomblob(100), randomblob(100) FROM t1;
+ INSERT INTO t1 SELECT randomblob(100), randomblob(100) FROM t1;
+ INSERT INTO t1 SELECT randomblob(100), randomblob(100) FROM t1;
+ INSERT INTO t1 SELECT randomblob(100), randomblob(100) FROM t1;
+ INSERT INTO t1 SELECT randomblob(100), randomblob(100) FROM t1;
+ INSERT INTO t1 SELECT randomblob(100), randomblob(100) FROM t1;
+ INSERT INTO t1 SELECT randomblob(100), randomblob(100) FROM t1;
+ INSERT INTO t1 SELECT randomblob(100), randomblob(100) FROM t1;
+ INSERT INTO t1 SELECT randomblob(100), randomblob(100) FROM t1;
+ INSERT INTO t1 SELECT randomblob(100), randomblob(100) FROM t1;
+ INSERT INTO t1 SELECT randomblob(100), randomblob(100) FROM t1;
+ INSERT INTO t1 SELECT randomblob(100), randomblob(100) FROM t1;
+ INSERT INTO t1 SELECT randomblob(100), randomblob(100) FROM t1;
+ INSERT INTO t1 SELECT randomblob(100), randomblob(100) FROM t1;
+ DELETE FROM t1 WHERE rowid%2;
+}
+db_save_and_close
+
+for {set i 0} {$i < 20} {incr i} {
+ db_restore_and_reopen
+ do_test 2.[expr $i+1].1 {
+ crashsql -file test.db -seed $i {VACUUM}
+ } {1 {child process exited abnormally}}
+ do_execsql_test 2.[expr $i+1].2 { PRAGMA integrity_check } {ok}
+}
+
+
finish_test
« no previous file with comments | « third_party/sqlite/src/test/crash6.test ('k') | third_party/sqlite/src/test/crash8.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698