Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Unified Diff: third_party/sqlite/sqlite-src-3080704/test/oserror.test

Issue 2363173002: [sqlite] Remove obsolete reference version 3.8.7.4. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/sqlite/sqlite-src-3080704/test/oserror.test
diff --git a/third_party/sqlite/sqlite-src-3080704/test/oserror.test b/third_party/sqlite/sqlite-src-3080704/test/oserror.test
deleted file mode 100644
index 40d2966bcca57409fdb25aeb58375261c9a4d6d3..0000000000000000000000000000000000000000
--- a/third_party/sqlite/sqlite-src-3080704/test/oserror.test
+++ /dev/null
@@ -1,125 +0,0 @@
-# 2011 February 19
-#
-# The author disclaims copyright to this source code. In place of
-# a legal notice, here is a blessing:
-#
-# May you do good and not evil.
-# May you find forgiveness for yourself and forgive others.
-# May you share freely, never taking more than you give.
-#
-#***********************************************************************
-# This file implements regression tests for SQLite library. The
-# focus of this file is testing that error messages are logged via the
-# sqlite3_log() mechanism when certain errors are encountered in the
-# default unix or windows VFS modules.
-#
-
-set testdir [file dirname $argv0]
-source $testdir/tester.tcl
-if {$::tcl_platform(platform)!="unix"} { finish_test ; return }
-set ::testprefix oserror
-
-db close
-sqlite3_shutdown
-test_sqlite3_log xLog
-proc xLog {error_code msg} {
- if {[string match os_* $msg]} {
- lappend ::log $msg
- }
-}
-
-proc do_re_test {tn script expression} {
- uplevel do_test $tn [list [subst -nocommands {
- set res [eval { $script }]
- if {[regexp {$expression} [set res]]} {
- set {} {$expression}
- } else {
- set res
- }
- }]] [list $expression]
-
-}
-
-#--------------------------------------------------------------------------
-# Tests oserror-1.* test failures in the open() system call.
-#
-
-# Test a failure in open() due to too many files.
-#
-# The xOpen() method of the unix VFS calls getcwd() as well as open().
-# Although this does not appear to be documented in the man page, on OSX
-# a call to getcwd() may fail if there are no free file descriptors. So
-# an error may be reported for either open() or getcwd() here.
-#
-puts "Possible valgrind error about invalid file descriptor follows:"
-do_test 1.1.1 {
- set ::log [list]
- list [catch {
- for {set i 0} {$i < 2000} {incr i} { sqlite3 dbh_$i test.db -readonly 1 }
- } msg] $msg
-} {1 {unable to open database file}}
-do_test 1.1.2 {
- catch { for {set i 0} {$i < 2000} {incr i} { dbh_$i close } }
-} {1}
-do_re_test 1.1.3 {
- lindex $::log 0
-} {^os_unix.c:\d+: \(\d+\) (open|getcwd)\(.*test.db\) - }
-
-
-# Test a failure in open() due to the path being a directory.
-#
-do_test 1.2.1 {
- file mkdir dir.db
- set ::log [list]
- list [catch { sqlite3 dbh dir.db } msg] $msg
-} {1 {unable to open database file}}
-
-do_re_test 1.2.2 { lindex $::log 0 } {^os_unix.c:\d+: \(\d+\) open\(.*dir.db\) - }
-
-# Test a failure in open() due to the path not existing.
-#
-do_test 1.3.1 {
- set ::log [list]
- list [catch { sqlite3 dbh /x/y/z/test.db } msg] $msg
-} {1 {unable to open database file}}
-
-do_re_test 1.3.2 { lindex $::log 0 } {^os_unix.c:\d+: \(\d+\) open\(.*test.db\) - }
-
-# Test a failure in open() due to the path not existing.
-#
-do_test 1.4.1 {
- set ::log [list]
- list [catch { sqlite3 dbh /root/test.db } msg] $msg
-} {1 {unable to open database file}}
-
-do_re_test 1.4.2 { lindex $::log 0 } {^os_unix.c:\d*: \(\d+\) open\(.*test.db\) - }
-
-#--------------------------------------------------------------------------
-# Tests oserror-1.* test failures in the unlink() system call.
-#
-ifcapable wal {
- do_test 2.1.1 {
- set ::log [list]
- file mkdir test.db-wal
- forcedelete test.db
- list [catch {
- sqlite3 dbh test.db
- execsql { SELECT * FROM sqlite_master } dbh
- } msg] $msg
- } {1 {disk I/O error}}
-
- do_re_test 2.1.2 {
- lindex $::log 0
- } {^os_unix.c:\d+: \(\d+\) unlink\(.*test.db-wal\) - }
- do_test 2.1.3 {
- catch { dbh close }
- forcedelete test.db-wal
- } {}
-}
-
-
-test_syscall reset
-sqlite3_shutdown
-test_sqlite3_log
-sqlite3_initialize
-finish_test
« no previous file with comments | « third_party/sqlite/sqlite-src-3080704/test/orderby7.test ('k') | third_party/sqlite/sqlite-src-3080704/test/ovfl.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698