| OLD | NEW |
| 1 # 2014 March 25. | 1 # 2014 March 25. |
| 2 # | 2 # |
| 3 # The author disclaims copyright to this source code. In place of | 3 # The author disclaims copyright to this source code. In place of |
| 4 # a legal notice, here is a blessing: | 4 # a legal notice, here is a blessing: |
| 5 # | 5 # |
| 6 # May you do good and not evil. | 6 # May you do good and not evil. |
| 7 # May you find forgiveness for yourself and forgive others. | 7 # May you find forgiveness for yourself and forgive others. |
| 8 # May you share freely, never taking more than you give. | 8 # May you share freely, never taking more than you give. |
| 9 # | 9 # |
| 10 #*********************************************************************** | 10 #*********************************************************************** |
| 11 # This file implements regression tests for SQLite library. | 11 # This file implements regression tests for SQLite library. |
| 12 # | 12 # |
| 13 # Specifically, it tests the effects of fault injection on the sorter | 13 # Specifically, it tests the effects of fault injection on the sorter |
| 14 # module (code in vdbesort.c). | 14 # module (code in vdbesort.c). |
| 15 # | 15 # |
| 16 | 16 |
| 17 set testdir [file dirname $argv0] | 17 set testdir [file dirname $argv0] |
| 18 source $testdir/tester.tcl | 18 source $testdir/tester.tcl |
| 19 set testprefix sortfault | 19 set testprefix sortfault |
| 20 db close |
| 21 sqlite3_shutdown |
| 22 sqlite3_config_pmasz 10 |
| 23 sqlite3_initialize |
| 24 sqlite3 db test.db |
| 25 |
| 20 | 26 |
| 21 do_execsql_test 1.0 { | 27 do_execsql_test 1.0 { |
| 22 PRAGMA cache_size = 5; | 28 PRAGMA cache_size = 5; |
| 23 } | 29 } |
| 24 | 30 |
| 25 foreach {tn mmap_limit nWorker tmpstore threadsmode fakeheap lookaside} { | 31 foreach {tn mmap_limit nWorker tmpstore threadsmode fakeheap lookaside} { |
| 26 1 0 0 file multithread false false | 32 1 0 0 file multithread false false |
| 27 2 100000 0 file multithread false false | 33 2 100000 0 file multithread false false |
| 28 3 100000 1 file multithread false false | 34 3 100000 1 file multithread false false |
| 29 4 2000000 0 file singlethread false true | 35 4 2000000 0 file singlethread false true |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 INSERT INTO t1 VALUES($c, $b, $a); | 162 INSERT INTO t1 VALUES($c, $b, $a); |
| 157 } | 163 } |
| 158 | 164 |
| 159 do_faultsim_test 5.1 -faults oom* -body { | 165 do_faultsim_test 5.1 -faults oom* -body { |
| 160 execsql { SELECT * FROM t1 ORDER BY a } | 166 execsql { SELECT * FROM t1 ORDER BY a } |
| 161 } -test { | 167 } -test { |
| 162 faultsim_test_result [list 0 [list $::a $::b $::c $::c $::b $::a]] | 168 faultsim_test_result [list 0 [list $::a $::b $::c $::c $::b $::a]] |
| 163 } | 169 } |
| 164 | 170 |
| 165 finish_test | 171 finish_test |
| OLD | NEW |