/ Check-in [a27b0b88]
Login

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

Overview
Comment:Changes to oserror.test so that it works even on systems that allow an unusually large number of file descriptors.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: a27b0b880d76c6838c0365f66bcd69b1b49b7594470993b608f4e490cbdc4882
User & Date: drh 2019-04-29 16:44:11
Context
2019-04-30
01:08
Slightly smaller and faster implementation of the OP_MakeRecord opcode. check-in: 3bdce7ef user: drh tags: trunk
2019-04-29
16:44
Changes to oserror.test so that it works even on systems that allow an unusually large number of file descriptors. check-in: a27b0b88 user: drh tags: trunk
13:48
Do not de-duplicate columns index columns associated with a WITHOUT ROWID table if the columns have different collating sequences. This is the fix for ticket [3182d3879020ef3b2]. There is one test case added, but most of the tests are done in TH3. check-in: 1b1dd4d4 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/oserror.test.

    48     48   #
    49     49   # The xOpen() method of the unix VFS calls getcwd() as well as open().
    50     50   # Although this does not appear to be documented in the man page, on OSX
    51     51   # a call to getcwd() may fail if there are no free file descriptors. So
    52     52   # an error may be reported for either open() or getcwd() here.
    53     53   #
    54     54   if {![clang_sanitize_address]} {
           55  +  unset -nocomplain rc
           56  +  unset -nocomplain nOpen
           57  +  set nOpen 20000
    55     58     do_test 1.1.1 {
    56     59       set ::log [list]
    57         -    list [catch {
    58         -      for {set i 0} {$i < 20000} {incr i} { sqlite3 dbh_$i test.db -readonly 1 }
    59         -    } msg] $msg
    60         -  } {1 {unable to open database file}}
           60  +    set ::rc [catch {
           61  +      for {set i 0} {$i < $::nOpen} {incr i} { sqlite3 dbh_$i test.db -readonly 1 }
           62  +    } msg]
           63  +    if {$::rc==0} {
           64  +      # Some system (ex: Debian) are able to create 20000+ file descriptiors
           65  +      # such systems will not fail here
           66  +      set x ok
           67  +    } elseif {$::rc==1 && $msg=="unable to open database file"} {
           68  +      set x ok
           69  +    } else {
           70  +      set x [list $::rc $msg]
           71  +    }
           72  +  } {ok}
    61     73     do_test 1.1.2 {
    62         -    catch { for {set i 0} {$i < 20000} {incr i} { dbh_$i close } }
    63         -  } {1}
    64         -  do_re_test 1.1.3 { 
    65         -    lindex $::log 0 
    66         -  } {^os_unix.c:\d+: \(\d+\) (open|getcwd)\(.*test.db\) - }
           74  +    catch { for {set i 0} {$i < $::nOpen} {incr i} { dbh_$i close } }
           75  +  } $::rc
           76  +  if {$rc} {
           77  +    do_re_test 1.1.3 { 
           78  +      lindex $::log 0 
           79  +    } {^os_unix.c:\d+: \(\d+\) (open|getcwd)\(.*test.db\) - }
           80  +  }
    67     81   }
    68     82   
    69     83   
    70     84   # Test a failure in open() due to the path being a directory.
    71     85   #
    72     86   do_test 1.2.1 {
    73     87     file mkdir dir.db