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

Unified Diff: third_party/sqlite/src/test/tkt3457.test

Issue 949043002: Add //third_party/sqlite to dirs_to_snapshot, remove net_sql.patch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « third_party/sqlite/src/test/tkt3442.test ('k') | third_party/sqlite/src/test/tkt3527.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/tkt3457.test
diff --git a/third_party/sqlite/src/test/tkt3457.test b/third_party/sqlite/src/test/tkt3457.test
index 71eb424640facb32dfa39cac131e683040a30ad1..04757413221c16d0143da057d438d3f68c905f1c 100644
--- a/third_party/sqlite/src/test/tkt3457.test
+++ b/third_party/sqlite/src/test/tkt3457.test
@@ -46,8 +46,8 @@ do_test tkt3457-1.1 {
INSERT INTO t1 VALUES(4, 5, 6);
}
- file copy -force test.db bak.db
- file copy -force test.db-journal bak.db-journal
+ forcecopy test.db bak.db
+ forcecopy test.db-journal bak.db-journal
# Fix the first journal-header in the journal-file. Because the
# journal file has not yet been synced, the 8-byte magic string at the
@@ -62,26 +62,40 @@ do_test tkt3457-1.1 {
execsql COMMIT
} {}
+# Disable fchmod to make sure SQLite itself does not try to change the
+# permission bits on us
+#
+catch {
+ test_syscall install fchmod
+ test_syscall fault 1 1
+}
+
do_test tkt3457-1.2 {
- file copy -force bak.db-journal test.db-journal
+ forcecopy bak.db-journal test.db-journal
file attributes test.db-journal -permissions ---------
catchsql { SELECT * FROM t1 }
} {1 {unable to open database file}}
do_test tkt3457-1.3 {
- file copy -force bak.db-journal test.db-journal
+ forcecopy bak.db-journal test.db-journal
file attributes test.db-journal -permissions -w--w--w-
catchsql { SELECT * FROM t1 }
} {1 {unable to open database file}}
do_test tkt3457-1.4 {
- file copy -force bak.db-journal test.db-journal
+ forcecopy bak.db-journal test.db-journal
file attributes test.db-journal -permissions r--r--r--
catchsql { SELECT * FROM t1 }
} {1 {unable to open database file}}
do_test tkt3457-1.5 {
- file copy -force bak.db-journal test.db-journal
+ forcecopy bak.db-journal test.db-journal
file attributes test.db-journal -permissions rw-rw-rw-
catchsql { SELECT * FROM t1 }
} {0 {1 2 3 4 5 6}}
+# Reenable fchmod
+catch {
+ test_syscall uninstall
+ test_syscall fault 0 0
+}
+
finish_test
« no previous file with comments | « third_party/sqlite/src/test/tkt3442.test ('k') | third_party/sqlite/src/test/tkt3527.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698