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

Side by Side Diff: third_party/sqlite/src/test/crash7.test

Issue 694353003: Get `gn gen` to succeed on Windows (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: remove GYP_DEFINES code Created 6 years, 1 month 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # 2008 March 20
2 #
3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing:
5 #
6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give.
9 #
10 #***********************************************************************
11 #
12 # $Id: crash7.test,v 1.1 2008/04/03 14:36:26 danielk1977 Exp $
13
14 set testdir [file dirname $argv0]
15 source $testdir/tester.tcl
16
17 ifcapable !crashtest {
18 finish_test
19 return
20 }
21
22 proc signature {} {
23 return [db eval {SELECT count(*), md5sum(a), md5sum(b), md5sum(c) FROM abc}]
24 }
25
26 foreach f [list test.db test.db-journal] {
27 for {set ii 1} {$ii < 64} {incr ii} {
28 db close
29 file delete test.db
30 sqlite3 db test.db
31
32 set from_size [expr 1024 << ($ii&3)]
33 set to_size [expr 1024 << (($ii>>2)&3)]
34
35 execsql "
36 PRAGMA page_size = $from_size;
37 BEGIN;
38 CREATE TABLE abc(a PRIMARY KEY, b, c);
39 INSERT INTO abc VALUES(randomblob(100), randomblob(200), randomblob(1000)) ;
40 INSERT INTO abc
41 SELECT randomblob(1000), randomblob(200), randomblob(100)
42 FROM abc;
43 INSERT INTO abc
44 SELECT randomblob(100), randomblob(200), randomblob(1000)
45 FROM abc;
46 INSERT INTO abc
47 SELECT randomblob(100), randomblob(200), randomblob(1000)
48 FROM abc;
49 INSERT INTO abc
50 SELECT randomblob(100), randomblob(200), randomblob(1000)
51 FROM abc;
52 INSERT INTO abc
53 SELECT randomblob(100), randomblob(200), randomblob(1000)
54 FROM abc WHERE [expr $ii&16];
55 INSERT INTO abc
56 SELECT randomblob(25), randomblob(45), randomblob(9456)
57 FROM abc WHERE [expr $ii&32];
58 INSERT INTO abc
59 SELECT randomblob(100), randomblob(200), randomblob(1000)
60 FROM abc WHERE [expr $ii&8];
61 INSERT INTO abc
62 SELECT randomblob(25), randomblob(45), randomblob(9456)
63 FROM abc WHERE [expr $ii&4];
64 COMMIT;
65 "
66
67 set sig [signature]
68 db close
69
70 do_test crash7-1.$ii.crash {
71 crashsql -file $f "
72 PRAGMA page_size = $to_size;
73 VACUUM;
74 "
75 } {1 {child process exited abnormally}}
76
77 sqlite3 db test.db
78 integrity_check crash7-1.$ii.integrity
79 }
80 }
81
82 finish_test
OLDNEW
« 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