/ Check-in [80bdaafa77]
Login

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

Overview
Comment:Add a case to permutations.test to run tests with the IOCAP_SAFEAPPEND property set. (CVS 5693)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 80bdaafa77ec5c967f633eaaf5ee6f493a6e5a56
User & Date: danielk1977 2008-09-12 10:22:40
Context
2008-09-12
16:03
Declare the isInterrupted field of the sqlite3 structure to be volatile. Ticket #3369. (CVS 5694) check-in: 414da4ebce user: drh tags: trunk
10:22
Add a case to permutations.test to run tests with the IOCAP_SAFEAPPEND property set. (CVS 5693) check-in: 80bdaafa77 user: danielk1977 tags: trunk
2008-09-11
11:28
Add a couple of (fconfigure) commands to configure the incremental blob channels used by test file incrblob.test. This is required so that the tests work on windows and other platforms that have a default -translation mode other than 'lf'. (CVS 5692) check-in: 753caa20ca user: danielk1977 tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/test_devsym.c.

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
...
230
231
232
233
234
235
236

237
238
239
240




241
242
243
244
245
246
247
**
******************************************************************************
**
** This file contains code that modified the OS layer in order to simulate
** different device types (by overriding the return values of the 
** xDeviceCharacteristics() and xSectorSize() methods).
**
** $Id: test_devsym.c,v 1.7 2008/06/06 11:11:26 danielk1977 Exp $
*/
#if SQLITE_TEST          /* This file is used for testing only */

#include "sqlite3.h"
#include "sqliteInt.h"

/*
................................................................................
static int devsymOpen(
  sqlite3_vfs *pVfs,
  const char *zName,
  sqlite3_file *pFile,
  int flags,
  int *pOutFlags
){

  devsym_file *p = (devsym_file *)pFile;
  pFile->pMethods = &devsym_io_methods;
  p->pReal = (sqlite3_file *)&p[1];
  return sqlite3OsOpen(g.pVfs, zName, p->pReal, flags, pOutFlags);




}

/*
** Delete the file located at zPath. If the dirSync argument is true,
** ensure the file-system modifications are synced to disk before
** returning.
*/







|







 







>

<

|
>
>
>
>







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
...
230
231
232
233
234
235
236
237
238

239
240
241
242
243
244
245
246
247
248
249
250
251
**
******************************************************************************
**
** This file contains code that modified the OS layer in order to simulate
** different device types (by overriding the return values of the 
** xDeviceCharacteristics() and xSectorSize() methods).
**
** $Id: test_devsym.c,v 1.8 2008/09/12 10:22:40 danielk1977 Exp $
*/
#if SQLITE_TEST          /* This file is used for testing only */

#include "sqlite3.h"
#include "sqliteInt.h"

/*
................................................................................
static int devsymOpen(
  sqlite3_vfs *pVfs,
  const char *zName,
  sqlite3_file *pFile,
  int flags,
  int *pOutFlags
){
  int rc;
  devsym_file *p = (devsym_file *)pFile;

  p->pReal = (sqlite3_file *)&p[1];
  rc = sqlite3OsOpen(g.pVfs, zName, p->pReal, flags, pOutFlags);
  if( p->pReal->pMethods ){
    pFile->pMethods = &devsym_io_methods;
  }
  return rc;
}

/*
** Delete the file located at zPath. If the dirSync argument is true,
** ensure the file-system modifications are synced to disk before
** returning.
*/

Changes to test/permutations.test.

5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
..
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
...
576
577
578
579
580
581
582

















583
584
585
586
587
588
589
#
#    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.
#
#***********************************************************************
#
# $Id: permutations.test,v 1.29 2008/09/03 01:08:02 drh Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl

# Argument processing.
#
#puts "PERM-DEBUG: argv=$argv"
................................................................................
  crash6.test               malloc.test               speed4.test
  crash7.test               memleak.test              sqllimits1.test
  crash.test                memsubsys1.test           thread001.test
  exclusive3.test           memsubsys2.test           thread002.test
  fts3.test                 misc7.test                utf16.test
  fuzz_malloc.test          misuse.test               veryquick.test
  fuzz.test                 mutex2.test               vtab_err.test
  lookaside.test
}
set ALLTESTS [list]
foreach filename [glob $testdir/*.test] {
  set filename [file tail $filename]
  if {[lsearch $EXCLUDE $filename] < 0} { lappend ALLTESTS $filename }
}
set ALLTESTS [lsort $ALLTESTS]
................................................................................
#     close $fd
#     eval sa_crashsql $options
#   }
# } -shutdown {
#   rename crashsql {}
#   rename sa_crashsql crashsql
# } -include crash.test



















# End of tests
#############################################################################

if {$::perm::testmode eq "targets"} { puts "" ; exit }








|







 







|







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
..
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
...
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
#
#    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.
#
#***********************************************************************
#
# $Id: permutations.test,v 1.30 2008/09/12 10:22:40 danielk1977 Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl

# Argument processing.
#
#puts "PERM-DEBUG: argv=$argv"
................................................................................
  crash6.test               malloc.test               speed4.test
  crash7.test               memleak.test              sqllimits1.test
  crash.test                memsubsys1.test           thread001.test
  exclusive3.test           memsubsys2.test           thread002.test
  fts3.test                 misc7.test                utf16.test
  fuzz_malloc.test          misuse.test               veryquick.test
  fuzz.test                 mutex2.test               vtab_err.test
  lookaside.test            fuzz3.test
}
set ALLTESTS [list]
foreach filename [glob $testdir/*.test] {
  set filename [file tail $filename]
  if {[lsearch $EXCLUDE $filename] < 0} { lappend ALLTESTS $filename }
}
set ALLTESTS [lsort $ALLTESTS]
................................................................................
#     close $fd
#     eval sa_crashsql $options
#   }
# } -shutdown {
#   rename crashsql {}
#   rename sa_crashsql crashsql
# } -include crash.test

run_tests "safe_append" -description {
  Run some tests on a SAFE_APPEND file-system.
} -initialize {
  rename sqlite3 sqlite3_safeappend
  proc sqlite3 {args} {
    if {[string range [lindex $args 0] 0 0] ne "-"} {
      lappend args -vfs devsym
    }
    uplevel [concat sqlite3_safeappend $args]
  }
  sqlite3_simulate_device -char safe_append
} -shutdown {
  rename sqlite3 {}
  rename sqlite3_shutdown sqlite3
} -include [lsort [concat shared_err.test $ALLTESTS]] \
  -exclude async3.test


# End of tests
#############################################################################

if {$::perm::testmode eq "targets"} { puts "" ; exit }