Add retry logic for AV defense to winOpen. Also, refactor test suite to allow the key Tcl file operations (e.g. copy and delete) to be retried.

FossilOrigin-Name: 9007586fdabed8dbcc78581ea9821cfd1f9a4c8c
This commit is contained in:
mistachkin
2011-08-02 00:57:34 +00:00
parent c8eee5e5e1
commit fda06befd5
165 changed files with 926 additions and 859 deletions
+6 -6
View File
@@ -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
@@ -63,23 +63,23 @@ do_test tkt3457-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}}