SQLite
Check-in [52417eac]
Not logged in
Overview
SHA1 Hash:52417eac3ecaec2dbbde170334358f5ddbd32501
Date: 2013-04-29 09:17:42
User: dan
Comment:Fix mmap1.test so that it passes on windows as well as unix.
Tags And Properties
Context
2013-04-29
17:12
[72ac7318] Fix an off-by-one in the code for limiting the depth of FTS expression trees. (user: dan, tags: trunk)
09:20
[95811877] Merge mmap test fix from trunk. (user: mistachkin, tags: winOsTrace)
09:17
[52417eac] Fix mmap1.test so that it passes on windows as well as unix. (user: dan, tags: trunk)
07:01
[e81e9ca1] Update 'fuzzerfault' test for its new module loading command. Fix several test names in 'io.test' and make sure the database gets closed between tests. (user: mistachkin, tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/mmap1.test

36
37
38
39
40
41
42





43
44
45
46
47
48
49
50

51
52
53
54
55
56
57
      set str [format %.8x [expr [set ::rcnt] ^ 0xbdf20da3]] 
      string range [string repeat [set str] [expr [set n]/4]] 1 [set n]
    }
    $dbname func rblob rblob
  }]
}






foreach {t mmap_size nRead c2init} {
  1.1 { PRAGMA mmap_size = 67108864 }   4 {PRAGMA mmap_size = 0}
  1.2 { PRAGMA mmap_size =    53248 } 150 {PRAGMA mmap_size = 0}
  1.3 { PRAGMA mmap_size =        0 } 344 {PRAGMA mmap_size = 0}
  1.4 { PRAGMA mmap_size = 67108864 }   4 {PRAGMA mmap_size = 67108864 }
  1.5 { PRAGMA mmap_size =    53248 } 150 {PRAGMA mmap_size = 67108864 }
  1.6 { PRAGMA mmap_size =        0 } 344 {PRAGMA mmap_size = 67108864 }
} {

  do_multiclient_test tn {
    sql1 {PRAGMA page_size=1024}
    sql1 $mmap_size
    sql2 $c2init

    code2 [register_rblob_code db2 0]








>
>
>
>
>

|
|
|
|
|
|

>







36
37
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
      set str [format %.8x [expr [set ::rcnt] ^ 0xbdf20da3]] 
      string range [string repeat [set str] [expr [set n]/4]] 1 [set n]
    }
    $dbname func rblob rblob
  }]
}

# For cases 1.1 and 1.4, the number of pages read using xRead() is 4 on
# unix and 9 on windows. The difference is that windows only ever maps
# an integer number of OS pages (i.e. creates mappings that are a multiple 
# of 4KB in size). Whereas on unix any sized mapping may be created.
#
foreach {t mmap_size nRead c2init} {
  1.1 { PRAGMA mmap_size = 67108864 } /[49]/ {PRAGMA mmap_size = 0}
  1.2 { PRAGMA mmap_size =    53248 } 150    {PRAGMA mmap_size = 0}
  1.3 { PRAGMA mmap_size =        0 } 344    {PRAGMA mmap_size = 0}
  1.4 { PRAGMA mmap_size = 67108864 } /[49]/ {PRAGMA mmap_size = 67108864 }
  1.5 { PRAGMA mmap_size =    53248 } 150    {PRAGMA mmap_size = 67108864 }
  1.6 { PRAGMA mmap_size =        0 } 344    {PRAGMA mmap_size = 67108864 }
} {

  do_multiclient_test tn {
    sql1 {PRAGMA page_size=1024}
    sql1 $mmap_size
    sql2 $c2init

    code2 [register_rblob_code db2 0]