| OLD | NEW |
| 1 # 2005 October 3 | 1 # 2005 October 3 |
| 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 #*********************************************************************** |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 set filehandles {} | 37 set filehandles {} |
| 38 catch { | 38 catch { |
| 39 for {set i 0} {$i<($N * 3)} {incr i} { | 39 for {set i 0} {$i<($N * 3)} {incr i} { |
| 40 lappend filehandles [open testfile.1 w] | 40 lappend filehandles [open testfile.1 w] |
| 41 } | 41 } |
| 42 } | 42 } |
| 43 foreach fd $filehandles { | 43 foreach fd $filehandles { |
| 44 close $fd | 44 close $fd |
| 45 } | 45 } |
| 46 catch { | 46 catch { |
| 47 file delete -force testfile.1 | 47 forcedelete testfile.1 |
| 48 } | 48 } |
| 49 set N [expr $i / $num_fd_per_openwrite_db] | 49 set N [expr $i / $num_fd_per_openwrite_db] |
| 50 | 50 |
| 51 # Create a bunch of random database names | 51 # Create a bunch of random database names |
| 52 # | 52 # |
| 53 unset -nocomplain dbname | 53 unset -nocomplain dbname |
| 54 unset -nocomplain used | 54 unset -nocomplain used |
| 55 for {set i 0} {$i<$N} {incr i} { | 55 for {set i 0} {$i<$N} {incr i} { |
| 56 while 1 { | 56 while 1 { |
| 57 set name test-[format %08x [expr {int(rand()*0x7fffffff)}]].db | 57 set name test-[format %08x [expr {int(rand()*0x7fffffff)}]].db |
| (...skipping 27 matching lines...) Expand all Loading... |
| 85 } db$i | 85 } db$i |
| 86 } {1 2} | 86 } {1 2} |
| 87 } | 87 } |
| 88 | 88 |
| 89 | 89 |
| 90 # Close the databases and erase the files. | 90 # Close the databases and erase the files. |
| 91 # | 91 # |
| 92 for {set i 0} {$i<$N} {incr i} { | 92 for {set i 0} {$i<$N} {incr i} { |
| 93 do_test manydb-3.$i { | 93 do_test manydb-3.$i { |
| 94 db$i close | 94 db$i close |
| 95 file delete -force $dbname($i) | 95 forcedelete $dbname($i) |
| 96 } {} | 96 } {} |
| 97 } | 97 } |
| 98 | 98 |
| 99 | 99 |
| 100 | 100 |
| 101 | 101 |
| 102 finish_test | 102 finish_test |
| OLD | NEW |