/ Check-in [07f7dde8]
Login

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

Overview
Comment:Use the hexio test utility rather than TCL's binary I/O to avoid 32/64-bit problems in io.test. Ticket #2803. (This is a change to the test harness only - not to SQLite.) (CVS 4571)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 07f7dde8a636aa05b917daa6b248c6f98654aab8
User & Date: drh 2007-11-27 23:11:45
Context
2007-11-27
23:36
Add test cases to verify that the file format is preserved across VACUUM. Ticket #2804. (CVS 4572) check-in: 57400f50 user: drh tags: trunk
23:11
Use the hexio test utility rather than TCL's binary I/O to avoid 32/64-bit problems in io.test. Ticket #2803. (This is a change to the test harness only - not to SQLite.) (CVS 4571) check-in: 07f7dde8 user: drh tags: trunk
21:44
Remove superfluous -lpthread from publish_osx.sh. Ticket #2801. Fix a bug in mkdll.sh. (CVS 4570) check-in: 8d6e8fd3 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/io.test.

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
...
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
#
#***********************************************************************
#
# The focus of this file is testing some specific characteristics of the 
# IO traffic generated by SQLite (making sure SQLite is not writing out
# more database pages than it has to, stuff like that).
#
# $Id: io.test,v 1.12 2007/10/09 08:29:32 danielk1977 Exp $

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

# Test summary:
#
# io-1.* -  Test that quick-balance does not journal pages unnecessarily.
................................................................................
do_test io-4.2.1 {
  execsql { BEGIN }
  execsql { INSERT INTO abc VALUES('c', 'd') }
  file exists test.db-journal
} {1}
if {$::tcl_platform(platform)=="unix"} {
  do_test io-4.2.2 {
    set fd [open test.db-journal]
    fconfigure $fd -translation binary -encoding binary
    seek $fd 8
    set blob [read $fd 4]
    close $fd
    binary scan $blob i res
    format 0x%X $res
  } {0xFFFFFFFF}
}
do_test io-4.2.3 {
  execsql { COMMIT }
  nSync
} $expected_sync_count
sqlite3_simulate_device -char safe_append








|







 







|
<
<
<
<
<
<
|







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
...
439
440
441
442
443
444
445
446






447
448
449
450
451
452
453
454
#
#***********************************************************************
#
# The focus of this file is testing some specific characteristics of the 
# IO traffic generated by SQLite (making sure SQLite is not writing out
# more database pages than it has to, stuff like that).
#
# $Id: io.test,v 1.13 2007/11/27 23:11:45 drh Exp $

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

# Test summary:
#
# io-1.* -  Test that quick-balance does not journal pages unnecessarily.
................................................................................
do_test io-4.2.1 {
  execsql { BEGIN }
  execsql { INSERT INTO abc VALUES('c', 'd') }
  file exists test.db-journal
} {1}
if {$::tcl_platform(platform)=="unix"} {
  do_test io-4.2.2 {
    hexio_read test.db-journal 8 4






  } {FFFFFFFF}
}
do_test io-4.2.3 {
  execsql { COMMIT }
  nSync
} $expected_sync_count
sqlite3_simulate_device -char safe_append