~ubuntu-branches/ubuntu/maverick/evolution-data-server/maverick-proposed

« back to all changes in this revision

Viewing changes to libdb/test/bigfile002.tcl

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-05-17 17:02:06 UTC
  • mfrom: (1.1.79 upstream) (1.6.12 experimental)
  • Revision ID: james.westby@ubuntu.com-20100517170206-4ufr52vwrhh26yh0
Tags: 2.30.1-1ubuntu1
* Merge from debian experimental. Remaining change:
  (LP: #42199, #229669, #173703, #360344, #508494)
  + debian/control:
    - add Vcs-Bzr tag
    - don't use libgnome
    - Use Breaks instead of Conflicts against evolution 2.25 and earlier.
  + debian/evolution-data-server.install,
    debian/patches/45_libcamel_providers_version.patch:
    - use the upstream versioning, not a Debian-specific one 
  + debian/libedata-book1.2-dev.install, debian/libebackend-1.2-dev.install,
    debian/libcamel1.2-dev.install, debian/libedataserverui1.2-dev.install:
    - install html documentation
  + debian/rules:
    - don't build documentation it's shipped with the tarball

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# See the file LICENSE for redistribution information.
2
 
#
3
 
# Copyright (c) 2001-2002
4
 
#       Sleepycat Software.  All rights reserved.
5
 
#
6
 
# $Id$
7
 
#
8
 
# TEST  bigfile002
9
 
# TEST  This one should be faster and not require so much disk space,
10
 
# TEST  although it doesn't test as extensively.  Create an mpool file
11
 
# TEST  with 1K pages.  Dirty page 6000000.  Sync.
12
 
proc bigfile002 { args } {
13
 
        source ./include.tcl
14
 
 
15
 
        puts -nonewline \
16
 
            "Bigfile002: Creating large, sparse file through mpool..."
17
 
        flush stdout
18
 
 
19
 
        env_cleanup $testdir
20
 
 
21
 
        # Create env.
22
 
        set env [berkdb_env -create -home $testdir]
23
 
        error_check_good valid_env [is_valid_env $env] TRUE
24
 
 
25
 
        # Create the file.
26
 
        set name big002.file
27
 
        set file [$env mpool -create -pagesize 1024 $name]
28
 
 
29
 
        # Dirty page 6000000
30
 
        set pg [$file get -create 6000000]
31
 
        error_check_good pg_init [$pg init A] 0
32
 
        error_check_good pg_set [$pg is_setto A] 1
33
 
 
34
 
        # Put page back.
35
 
        error_check_good pg_put [$pg put -dirty] 0
36
 
 
37
 
        # Fsync.
38
 
        error_check_good fsync [$file fsync] 0
39
 
 
40
 
        puts "succeeded."
41
 
 
42
 
        # Close.
43
 
        error_check_good fclose [$file close] 0
44
 
        error_check_good env_close [$env close] 0
45
 
}