Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Skip tests that require setting detailed unix permissions on files when running on filesystems such as AFP that do not support that capability. (CVS 4866) |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
5589b9d395fb8267a124d56dd5d7987e |
User & Date: | drh 2008-03-15 14:53:05 |
Context
2008-03-17
| ||
09:36 | Return an error when an xBestIndex() method indicates that it intends to use the value of an unusable constraint. Related to #2998. (CVS 4867) check-in: ffd47027 user: danielk1977 tags: trunk | |
2008-03-15
| ||
14:53 | Skip tests that require setting detailed unix permissions on files when running on filesystems such as AFP that do not support that capability. (CVS 4866) check-in: 5589b9d3 user: drh tags: trunk | |
02:09 | Add tests to make sure the busy handler resets. (CVS 4865) check-in: 5e4df441 user: drh tags: trunk | |
Changes
Changes to test/misc7.test.
6 6 # May you do good and not evil. 7 7 # May you find forgiveness for yourself and forgive others. 8 8 # May you share freely, never taking more than you give. 9 9 # 10 10 #*********************************************************************** 11 11 # This file implements regression tests for SQLite library. 12 12 # 13 -# $Id: misc7.test,v 1.18 2008/01/23 12:52:41 drh Exp $ 13 +# $Id: misc7.test,v 1.19 2008/03/15 14:53:05 drh Exp $ 14 14 15 15 set testdir [file dirname $argv0] 16 16 source $testdir/tester.tcl 17 17 18 18 do_test misc7-1-misuse { 19 19 c_misuse_test 20 20 } {} ................................................................................ 359 359 # Test the situation where a hot-journal is discovered but write-access 360 360 # to it is denied. This should return SQLITE_BUSY. 361 361 # 362 362 # These tests do not work on windows due to restrictions in the 363 363 # windows file system. 364 364 # 365 365 if {$tcl_platform(platform)!="windows"} { 366 -do_test misc7-17.1 { 367 - execsql { 368 - BEGIN; 369 - DELETE FROM t3 WHERE (oid%3)==0; 370 - } 371 - copy_file test.db bak.db 372 - copy_file test.db-journal bak.db-journal 373 - execsql { 374 - COMMIT; 375 - } 366 + 367 + # Some network filesystems (ex: AFP) do not support setting read-only 368 + # permissions. Only run these tests if full unix permission setting 369 + # capabilities are supported. 370 + # 371 + file attributes test.db -permissions rw-r--r-- 372 + if {[file attributes test.db -permissions]==0644} { 376 373 377 - db close 378 - copy_file bak.db test.db 379 - copy_file bak.db-journal test.db-journal 380 - sqlite3 db test.db 381 - 382 - catch {file attributes test.db-journal -permissions r--------} 383 - catch {file attributes test.db-journal -readonly 1} 384 - catchsql { 385 - SELECT count(*) FROM t3; 386 - } 387 -} {1 {database is locked}} 388 -do_test misc7-17.2 { 389 - # Note that the -readonly flag must be cleared before the -permissions 390 - # are set. Otherwise, when using tcl 8.5 on mac, the fact that the 391 - # -readonly flag is set causes the attempt to set the permissions 392 - # to fail. 393 - catch {file attributes test.db-journal -readonly 0} 394 - catch {file attributes test.db-journal -permissions rw-------} 395 - catchsql { 396 - SELECT count(*) FROM t3; 397 - } 398 -} {0 32} 399 - 400 -set ::pending_byte_page [expr ($::sqlite_pending_byte / 1024) + 1] 401 -do_test misc7-17.3 { 402 - db eval { 403 - pragma writable_schema = true; 404 - UPDATE sqlite_master 405 - SET rootpage = $pending_byte_page 406 - WHERE type = 'table' AND name = 't3'; 407 - } 408 - execsql { 409 - SELECT rootpage FROM sqlite_master WHERE type = 'table' AND name = 't3'; 410 - } 411 -} $::pending_byte_page 412 - 413 -do_test misc7-17.4 { 414 - db close 415 - sqlite3 db test.db 416 - catchsql { 417 - SELECT count(*) FROM t3; 418 - } 419 -} {1 {database disk image is malformed}} 374 + do_test misc7-17.1 { 375 + execsql { 376 + BEGIN; 377 + DELETE FROM t3 WHERE (oid%3)==0; 378 + } 379 + copy_file test.db bak.db 380 + copy_file test.db-journal bak.db-journal 381 + execsql { 382 + COMMIT; 383 + } 384 + 385 + db close 386 + copy_file bak.db test.db 387 + copy_file bak.db-journal test.db-journal 388 + sqlite3 db test.db 389 + 390 + catch {file attributes test.db-journal -permissions r--------} 391 + catch {file attributes test.db-journal -readonly 1} 392 + catchsql { 393 + SELECT count(*) FROM t3; 394 + } 395 + } {1 {database is locked}} 396 + do_test misc7-17.2 { 397 + # Note that the -readonly flag must be cleared before the -permissions 398 + # are set. Otherwise, when using tcl 8.5 on mac, the fact that the 399 + # -readonly flag is set causes the attempt to set the permissions 400 + # to fail. 401 + catch {file attributes test.db-journal -readonly 0} 402 + catch {file attributes test.db-journal -permissions rw-------} 403 + catchsql { 404 + SELECT count(*) FROM t3; 405 + } 406 + } {0 32} 407 + 408 + set ::pending_byte_page [expr ($::sqlite_pending_byte / 1024) + 1] 409 + do_test misc7-17.3 { 410 + db eval { 411 + pragma writable_schema = true; 412 + UPDATE sqlite_master 413 + SET rootpage = $pending_byte_page 414 + WHERE type = 'table' AND name = 't3'; 415 + } 416 + execsql { 417 + SELECT rootpage FROM sqlite_master WHERE type = 'table' AND name = 't3'; 418 + } 419 + } $::pending_byte_page 420 + 421 + do_test misc7-17.4 { 422 + db close 423 + sqlite3 db test.db 424 + catchsql { 425 + SELECT count(*) FROM t3; 426 + } 427 + } {1 {database disk image is malformed}} 428 + } 420 429 } 421 430 422 431 # Ticket #2470 423 432 # 424 433 do_test misc7-18.1 { 425 434 execsql { 426 435 CREATE TABLE table_1 (col_10);