/ Check-in [05ac2548]
Login

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

Overview
Comment:Fix problems with running the async.test script.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:05ac2548652f3c9aa358289700b0b4c7fc22486d
User & Date: dan 2010-07-13 07:38:51
Context
2010-07-13
14:22
Fixes to the pcache10 and pcache90 permutations. check-in: 597d40fa user: dan tags: trunk
07:38
Fix problems with running the async.test script. check-in: 05ac2548 user: dan tags: trunk
2010-07-12
20:46
Updates to comments and code organization to reflect changes in os_unix.c; Updated winShmLock() with logic changes from unixShmLock(); Modified IO error returns in winShmMap() to match those in unixShmMap(); check-in: b73fe275 user: shaneh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/async.test.

38
39
40
41
42
43
44












45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
  select3.test
  select4.test
  trans.test
}

# Enable asynchronous IO.
sqlite3async_initialize "" 1













rename do_test async_really_do_test
proc do_test {name args} {
  uplevel async_really_do_test async_io-$name $args
  sqlite3async_start
  sqlite3async_control halt idle
  sqlite3async_wait
  sqlite3async_control halt never
}

foreach testfile [lsort -dictionary [glob $testdir/*.test]] {
  set tail [file tail $testfile]
  if {[lsearch -exact $ASYNC_INCLUDE $tail]<0} continue
  source $testfile

  # Make sure everything is flushed through. This is because [source]ing 
  # the next test file will delete the database file on disk (using
  # [file delete]). If the asynchronous backend still has the file
  # open, it will become confused.
  #
  sqlite3async_control halt idle
  sqlite3async_start
  sqlite3async_wait
  sqlite3async_control halt never
}

# Flush the write-queue and disable asynchronous IO. This should ensure
# all allocated memory is cleaned up.
set sqlite3async_trace 1
sqlite3async_control halt idle
sqlite3async_start
sqlite3async_wait
sqlite3async_control halt never
sqlite3async_shutdown
set sqlite3async_trace 0

rename do_test {}
rename async_really_do_test do_test
rename finish_test {}
rename async_really_finish_test finish_test

if {[info exists ASYNC_SAVE_ISQUICK]} { set G(isquick) $ASYNC_SAVE_ISQUICK }
finish_test







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




|
<
<
<












|
<
<
<





|
<
<
<










38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61



62
63
64
65
66
67
68
69
70
71
72
73
74



75
76
77
78
79
80



81
82
83
84
85
86
87
88
89
90
  select3.test
  select4.test
  trans.test
}

# Enable asynchronous IO.
sqlite3async_initialize "" 1

# This proc flushes the contents of the async-IO queue through to the 
# underlying VFS. A couple of the test scripts identified in $ASYNC_INCLUDE
# above contain lines like "catch flush_async_queue" in places where 
# this is required for the tests to work in async mode.
#
proc flush_async_queue {} {
  sqlite3async_control halt idle
  sqlite3async_start
  sqlite3async_wait
  sqlite3async_control halt never
}

rename do_test async_really_do_test
proc do_test {name args} {
  uplevel async_really_do_test async_io-$name $args
  flush_async_queue



}

foreach testfile [lsort -dictionary [glob $testdir/*.test]] {
  set tail [file tail $testfile]
  if {[lsearch -exact $ASYNC_INCLUDE $tail]<0} continue
  source $testfile

  # Make sure everything is flushed through. This is because [source]ing 
  # the next test file will delete the database file on disk (using
  # [file delete]). If the asynchronous backend still has the file
  # open, it will become confused.
  #
  flush_async_queue



}

# Flush the write-queue and disable asynchronous IO. This should ensure
# all allocated memory is cleaned up.
set sqlite3async_trace 1
flush_async_queue



sqlite3async_shutdown
set sqlite3async_trace 0

rename do_test {}
rename async_really_do_test do_test
rename finish_test {}
rename async_really_finish_test finish_test

if {[info exists ASYNC_SAVE_ISQUICK]} { set G(isquick) $ASYNC_SAVE_ISQUICK }
finish_test

Changes to test/lock2.test.

91
92
93
94
95
96
97

98
99
100
101
102
103
104
105
106
107
108
109
110
  }
} {0 {}}
do_test lock2-1.9 {
  execsql {
    SELECT * FROM sqlite_master;
  }
} "table abc abc [expr $AUTOVACUUM?3:2] {CREATE TABLE abc(a, b, c)}"

do_test lock2-1.10 {
  testfixture $::tf1 {
    db eval {
      SELECT * FROM sqlite_master;
    }
  }
} "table abc abc [expr $AUTOVACUUM?3:2] {CREATE TABLE abc(a, b, c)}"

catch {testfixture $::tf1 {db close}}
catch {close $::tf1}
sqlite3_soft_heap_limit $cmdlinearg(soft-heap-limit)

finish_test







>













91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
  }
} {0 {}}
do_test lock2-1.9 {
  execsql {
    SELECT * FROM sqlite_master;
  }
} "table abc abc [expr $AUTOVACUUM?3:2] {CREATE TABLE abc(a, b, c)}"
catch flush_async_queue
do_test lock2-1.10 {
  testfixture $::tf1 {
    db eval {
      SELECT * FROM sqlite_master;
    }
  }
} "table abc abc [expr $AUTOVACUUM?3:2] {CREATE TABLE abc(a, b, c)}"

catch {testfixture $::tf1 {db close}}
catch {close $::tf1}
sqlite3_soft_heap_limit $cmdlinearg(soft-heap-limit)

finish_test

Changes to test/trans.test.

928
929
930
931
932
933
934

935
936
937
938
939
940
941
  } $sig
  if {$i<$limit} {
    do_test trans-9.$i.3-$cnt {
       execsql {
         INSERT INTO t3 SELECT randstr(10,400) FROM t3 WHERE random()%10==0;
       }
    } {}

    if {$tcl_platform(platform)=="unix"} {
      do_test trans-9.$i.4-$cnt {
         expr {$sqlite_sync_count>0}
      } 1
      ifcapable pager_pragmas {
        do_test trans-9.$i.5-$cnt {
           expr {$sqlite_fullsync_count>0}







>







928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
  } $sig
  if {$i<$limit} {
    do_test trans-9.$i.3-$cnt {
       execsql {
         INSERT INTO t3 SELECT randstr(10,400) FROM t3 WHERE random()%10==0;
       }
    } {}
    catch flush_async_queue
    if {$tcl_platform(platform)=="unix"} {
      do_test trans-9.$i.4-$cnt {
         expr {$sqlite_sync_count>0}
      } 1
      ifcapable pager_pragmas {
        do_test trans-9.$i.5-$cnt {
           expr {$sqlite_fullsync_count>0}