File: test084.tcl

package info (click to toggle)
evolution-data-server 1.6.3-5etch3
  • links: PTS
  • area: main
  • in suites: etch
  • size: 59,384 kB
  • ctags: 43,218
  • sloc: ansic: 319,315; tcl: 30,499; xml: 19,166; sh: 18,776; perl: 11,529; cpp: 8,259; java: 7,653; makefile: 6,448; awk: 1,338; yacc: 1,103; sed: 772; cs: 505; lex: 134; asm: 14
file content (53 lines) | stat: -rw-r--r-- 1,502 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# See the file LICENSE for redistribution information.
#
# Copyright (c) 2000-2002
#	Sleepycat Software.  All rights reserved.
#
# $Id: test084.tcl,v 1.1.1.1 2003/11/20 22:14:02 toshok Exp $
#
# TEST	test084
# TEST	Basic sanity test (test001) with large (64K) pages.
proc test084 { method {nentries 10000} {tnum 84} {pagesize 65536} args} {
	source ./include.tcl

	set txnenv 0
	set eindex [lsearch -exact $args "-env"]
	#
	# If we are using an env, then testfile should just be the db name.
	# Otherwise it is the test directory and the name.
	if { $eindex == -1 } {
		set testfile $testdir/test0$tnum-empty.db
		set env NULL
	} else {
		set testfile test0$tnum-empty.db
		incr eindex
		set env [lindex $args $eindex]
		set txnenv [is_txnenv $env]
		if { $txnenv == 1 } {
			append args " -auto_commit "
		}
		set testdir [get_home $env]
	}

	set pgindex [lsearch -exact $args "-pagesize"]
	if { $pgindex != -1 } {
		puts "Test084: skipping for specific pagesizes"
		return
	}

	cleanup $testdir $env

	set args "-pagesize $pagesize $args"

	eval {test001 $method $nentries 0 $tnum 0} $args

	set omethod [convert_method $method]
	set args [convert_args $method $args]

	# For good measure, create a second database that's empty
	# with the large page size.  (There was a verifier bug that
	# choked on empty 64K pages. [#2408])
	set db [eval {berkdb_open -create -mode 0644} $args $omethod $testfile]
	error_check_good empty_db [is_valid_db $db] TRUE
	error_check_good empty_db_close [$db close] 0
}