1
# See the file LICENSE for redistribution information.
3
# Copyright (c) 1999-2001
4
# Sleepycat Software. All rights reserved.
6
# $Id: env009.tcl,v 1.1.2.1 2001/07/23 20:40:23 jbj Exp $
9
# Test calls to all the various stat functions.
10
# We have several sprinkled throughout the test suite, but
11
# this will ensure that we run all of them at least once.
15
puts "Env009: Various stat function test."
18
puts "\tEnv009.a: Setting up env and a database."
20
set e [berkdb env -create -home $testdir -txn]
21
error_check_good dbenv [is_valid_env $e] TRUE
22
set dbbt [berkdb_open -create -btree $testdir/env009bt.db]
23
error_check_good dbopen [is_valid_db $dbbt] TRUE
24
set dbh [berkdb_open -create -hash $testdir/env009h.db]
25
error_check_good dbopen [is_valid_db $dbh] TRUE
26
set dbq [berkdb_open -create -btree $testdir/env009q.db]
27
error_check_good dbopen [is_valid_db $dbq] TRUE
30
{ "lock_stat" "Max locks" "Env009.b"}
31
{ "log_stat" "Magic" "Env009.c"}
32
{ "mpool_stat" "Number of caches" "Env009.d"}
33
{ "txn_stat" "Max Txns" "Env009.e"}
37
set cmd [lindex $pair 0]
38
set str [lindex $pair 1]
39
set msg [lindex $pair 2]
42
error_check_good $cmd [is_substr $ret $str] 1
44
puts "\tEnv009.f: btree stats"
46
error_check_good $cmd [is_substr $ret "Magic"] 1
47
puts "\tEnv009.g: hash stats"
49
error_check_good $cmd [is_substr $ret "Magic"] 1
50
puts "\tEnv009.f: queue stats"
52
error_check_good $cmd [is_substr $ret "Magic"] 1
53
error_check_good dbclose [$dbbt close] 0
54
error_check_good dbclose [$dbh close] 0
55
error_check_good dbclose [$dbq close] 0
56
error_check_good envclose [$e close] 0