/ Check-in [ddb747d3]
Login

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

Overview
Comment:Unix errno integer can vary from one system to the next. So do not depend on specific errno values in test cases.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: ddb747d33a004c7fe532a661e879ccba68c79c59
User & Date: drh 2011-03-08 14:05:07
Context
2011-03-08
16:39
Merge the syscall-override changes into trunk. check-in: 36d79e6f user: drh tags: trunk
14:05
Unix errno integer can vary from one system to the next. So do not depend on specific errno values in test cases. check-in: ddb747d3 user: drh tags: trunk
13:06
Fix two compiler warnings. No functional code changes. check-in: c829868a user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/oserror.test.

    52     52       for {set i 0} {$i < 2000} {incr i} { sqlite3 dbh_$i test.db -readonly 1 }
    53     53     } msg] $msg
    54     54   } {1 {unable to open database file}}
    55     55   do_test 1.1.2 {
    56     56     catch { for {set i 0} {$i < 2000} {incr i} { dbh_$i close } }
    57     57   } {1}
    58     58   
    59         -do_re_test 1.1.3 { lindex $::log 0 } {^os_unix.c:\d*: \(24\) open\(.*test.db\) - }
           59  +do_re_test 1.1.3 { lindex $::log 0 } {^os_unix.c:\d+: \(\d+\) open\(.*test.db\) - }
    60     60   
    61     61   
    62     62   # Test a failure in open() due to the path being a directory.
    63     63   #
    64     64   do_test 1.2.1 {
    65     65     file mkdir dir.db
    66     66     set ::log [list]
    67     67     list [catch { sqlite3 dbh dir.db } msg] $msg
    68     68   } {1 {unable to open database file}}
    69     69   
    70         -do_re_test 1.2.2 { lindex $::log 0 } {^os_unix.c:\d*: \(21\) open\(.*dir.db\) - }
           70  +do_re_test 1.2.2 { lindex $::log 0 } {^os_unix.c:\d+: \(\d+\) open\(.*dir.db\) - }
    71     71   
    72     72   # Test a failure in open() due to the path not existing.
    73     73   #
    74     74   do_test 1.3.1 {
    75     75     set ::log [list]
    76     76     list [catch { sqlite3 dbh /x/y/z/test.db } msg] $msg
    77     77   } {1 {unable to open database file}}
    78     78   
    79         -do_re_test 1.3.2 { lindex $::log 0 } {^os_unix.c:\d*: \(2\) open\(.*test.db\) - }
           79  +do_re_test 1.3.2 { lindex $::log 0 } {^os_unix.c:\d+: \(\d+\) open\(.*test.db\) - }
    80     80   
    81     81   # Test a failure in open() due to the path not existing.
    82     82   #
    83     83   do_test 1.4.1 {
    84     84     set ::log [list]
    85     85     list [catch { sqlite3 dbh /root/test.db } msg] $msg
    86     86   } {1 {unable to open database file}}
    87     87   
    88         -do_re_test 1.4.2 { lindex $::log 0 } {^os_unix.c:\d*: \(13\) open\(.*test.db\) - }
           88  +do_re_test 1.4.2 { lindex $::log 0 } {^os_unix.c:\d*: \(\d+\) open\(.*test.db\) - }
    89     89   
    90     90   #--------------------------------------------------------------------------
    91     91   # Tests oserror-1.* test failures in the unlink() system call.
    92     92   #
    93     93   do_test 2.1.1 {
    94     94     set ::log [list]
    95     95     file mkdir test.db-wal
    96     96     forcedelete test.db
    97     97     sqlite3 dbh test.db
    98     98     catchsql { SELECT * FROM sqlite_master } dbh
    99     99   } {1 {disk I/O error}}
   100    100   
   101         -do_re_test 2.1.2 { lindex $::log 0 } {^os_unix.c:\d*: \(21\) unlink\(.*test.db-wal\) - }
          101  +do_re_test 2.1.2 { lindex $::log 0 } {^os_unix.c:\d+: \(\d+\) unlink\(.*test.db-wal\) - }
   102    102   do_test 2.1.3 { 
   103    103     dbh close
   104    104     forcedelete test.db-wal
   105    105   } {}
   106    106     
   107    107   
   108    108   sqlite3_shutdown
   109    109   test_sqlite3_log 
   110    110   sqlite3_initialize
   111    111   finish_test