/ Check-in [9b960787]
Login

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

Overview
Comment:Print an error message and quit if the regression tests are run as root. Ticket #1153. (CVS 2366)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9b96078763949a2723482328e7b90c939ba8d2d8
User & Date: drh 2005-03-02 05:18:57
Context
2005-03-09
12:26
Support for a future ALTER TABLE command to add columns with default values. (CVS 2367) check-in: 9d5abc1d user: danielk1977 tags: trunk
2005-03-02
05:18
Print an error message and quit if the regression tests are run as root. Ticket #1153. (CVS 2366) check-in: 9b960787 user: drh tags: trunk
05:18
Fix the header comment on experimental.c. (CVS 2365) check-in: 0c4d2b11 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/attach.test.

     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.  The
    12     12   # focus of this script is testing the ATTACH and DETACH commands
    13     13   # and related functionality.
    14     14   #
    15         -# $Id: attach.test,v 1.37 2005/01/24 10:26:00 danielk1977 Exp $
           15  +# $Id: attach.test,v 1.38 2005/03/02 05:18:57 drh Exp $
    16     16   #
    17     17   
    18     18   set testdir [file dirname $argv0]
    19     19   source $testdir/tester.tcl
    20     20   
    21     21   for {set i 2} {$i<=15} {incr i} {
    22     22     file delete -force test$i.db
................................................................................
   670    670   } {0 {}}
   671    671   if {$tcl_platform(platform)=="unix"} {
   672    672     do_test attach-6.2 {
   673    673       sqlite3 dbx cannot-read
   674    674       dbx eval {CREATE TABLE t1(a,b,c)}
   675    675       dbx close
   676    676       file attributes cannot-read -permission 0000
          677  +    if {[file writable cannot-read]} {
          678  +      puts "\n**** Tests do not work when run as root ****"
          679  +      file delete -force cannot-read
          680  +      exit 1
          681  +    }
   677    682       catchsql {
   678    683         ATTACH DATABASE 'cannot-read' AS noread;
   679    684       }
   680    685     } {1 {unable to open database: cannot-read}}
   681    686     file delete -force cannot-read
   682    687   }
   683    688