/ Check-in [dba2cc0d]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Ensure a low system limit on the number of open files does not cause manydb.test to fail. (CVS 2784)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:dba2cc0d0e0c648c1a4798bc72913e3b19acba6e
User & Date: danielk1977 2005-11-25 10:55:58
Context
2005-11-26
00:25
Modify the OS layer so that I/O routines are called through a virtual function table. The os_test.c module has been replaced by test6.c. The crash tests are busted now and need to be fixed. (CVS 2785) check-in: 1f69aec2 user: drh tags: trunk
2005-11-25
10:55
Ensure a low system limit on the number of open files does not cause manydb.test to fail. (CVS 2784) check-in: dba2cc0d user: danielk1977 tags: trunk
10:38
Add the compilation option SQLITE_DISABLE_DIRSYNC (CVS 2783) check-in: f9f5ecbb user: danielk1977 tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/manydb.test.

9
10
11
12
13
14
15
16
17
18
19
20
21
















22
23
24
25
26
27
28
#
#***********************************************************************
# This file implements regression tests for SQLite library.
#
# This file implements tests the ability of the library to open
# many different databases at the same time without leaking memory.
#
# $Id: manydb.test,v 1.1 2005/10/03 15:11:09 drh Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl

set N 300

















# Create a bunch of random database names
#
unset -nocomplain dbname
unset -nocomplain used
for {set i 0} {$i<$N} {incr i} {
  while 1 {







|





>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#
#***********************************************************************
# This file implements regression tests for SQLite library.
#
# This file implements tests the ability of the library to open
# many different databases at the same time without leaking memory.
#
# $Id: manydb.test,v 1.2 2005/11/25 10:55:58 danielk1977 Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl

set N 300

# First test how many file descriptors are available for use. To open a
# database for writing SQLite requires 3 file descriptors (the database, the
# journal and the directory).
catch {
  for {set i 0} {$i<($N * 3)} {incr i} {
    lappend filehandles [open testfile.1 w]
  }
}
foreach fd $filehandles {
  close $fd
}
catch {
  file delete -force testfile.1
}
set N [expr $i / 3]

# Create a bunch of random database names
#
unset -nocomplain dbname
unset -nocomplain used
for {set i 0} {$i<$N} {incr i} {
  while 1 {