From: danielk1977 Date: Fri, 25 Nov 2005 10:55:57 +0000 (+0000) Subject: Ensure a low system limit on the number of open files does not cause manydb.test... X-Git-Tag: version-3.6.10~3376 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa2289f89c9def1a983b6c557285c057186ffbc7;p=thirdparty%2Fsqlite.git Ensure a low system limit on the number of open files does not cause manydb.test to fail. (CVS 2784) FossilOrigin-Name: dba2cc0d0e0c648c1a4798bc72913e3b19acba6e --- diff --git a/manifest b/manifest index 29fd2e972a..4e5d27db94 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Add\sthe\scompilation\soption\sSQLITE_DISABLE_DIRSYNC\s(CVS\s2783) -D 2005-11-25T10:38:22 +C Ensure\sa\slow\ssystem\slimit\son\sthe\snumber\sof\sopen\sfiles\sdoes\snot\scause\smanydb.test\sto\sfail.\s(CVS\s2784) +D 2005-11-25T10:55:58 F Makefile.in 7bed51530f32af7fe1945261c388d80998b39a12 F Makefile.linux-gcc aee18d8a05546dcf1888bd4547e442008a49a092 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028 @@ -177,7 +177,7 @@ F test/lock3.test 615111293cf32aa2ed16d01c6611737651c96fb9 F test/main.test b12f01d49a5c805a33fa6c0ef168691f63056e79 F test/malloc.test 666c77a878ce50f5c22b9211ed43e889cabb63a6 F test/malloc2.test 655b972372d2754a3f6c6ed54d7cfd18fde9bd32 -F test/manydb.test 18bc28e481d8e742a767858a8149bc96056aad46 +F test/manydb.test d81debbf5871242e3b5df1d3bb5e14c50431b6f8 F test/memdb.test 1860e060be810bf0775bc57408a5b7c4954bcaea F test/memleak.test df2b2b96e77f8ba159a332299535b1e5f18e49ac F test/minmax.test cad887abca5504396718e2cd5729ca40758743e8 @@ -321,7 +321,7 @@ F www/tclsqlite.tcl ddcf912ea48695603c8ed7efb29f0812ef8d1b49 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513 -P f1298bb103aad46c737741d89d33c4c2904aec68 -R efc3e024b52f9af7ccb6b746b407bfb0 +P f9f5ecbb79f03ba8e7d6a036a562252319e82abc +R ccf6548dbbfa01c325708c34e3a65ec7 U danielk1977 -Z a2ca547850d0fef3d8a36f221d37dffb +Z 66667bbf44f1416dcd406944ed2382c1 diff --git a/manifest.uuid b/manifest.uuid index d10ac7f69e..65d090ae6f 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -f9f5ecbb79f03ba8e7d6a036a562252319e82abc \ No newline at end of file +dba2cc0d0e0c648c1a4798bc72913e3b19acba6e \ No newline at end of file diff --git a/test/manydb.test b/test/manydb.test index 66af10be23..ce9b7efe00 100644 --- a/test/manydb.test +++ b/test/manydb.test @@ -13,13 +13,29 @@ # 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 $ +# $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