"SfR Fresh" - the SfR Freeware/Shareware Archive 
Member "mysql-4.0.27/bdb/test/upgrade/README" of archive mysql-4.0.27-win-src.zip:
As a special service "SfR Fresh" has tried to format the requested source page into HTML format using source code syntax highlighting with prefixed line numbers.
Alternatively you can here view or download the uninterpreted source code file.
That can be also achieved for any archive member file by clicking within an archive contents listing on the first character of the file(path) respectively on the according byte size field.
1 The Berkeley DB Upgrade Tests
2
3 Quick ref:
4
5 Running the tests:
6 (in tclsh)
7 % source ../test/test.tcl
8 % upgrade
9
10 Generating the test databases:
11 (in tclsh)
12 % source ../test/test.tcl
13 % gen_upgrade /where/you/want/them
14
15 (in your shell)
16 $ cd /where/you/want/them
17 $ perl $db_dir/upgrade/scripts/pack-3.0.pl
18 $ mv 3.0 $db_dir/upgrade/databases
19
20 What they are:
21
22 The DB upgrade tests are a framework for testing two main features of
23 Berkeley DB: the db_dump utility, and the "DB_UPGRADE" flag to DB->open.
24 They work by taking a tarred, gzipped set of test databases and dumps, and
25 verifying that the set of items is the same in the original database (as
26 dumped by the version of DB that created it) as in the upgraded one,
27 and is the same in the original database and in a new database generated by
28 db_loading a db_dump.
29
30 In db 3.X and higher, the upgrade test is repeated on a database with
31 the opposite endianness to the system the database was generated on.
32
33 How to generate test databases:
34
35 Ordinarily, this is something that only very rarely has to occur;
36 an archive of upgrade test databases can and should be kept, so ideally
37 the generation step only needs to be done once for each major DB release.
38
39 To generate the test databases, execute the command "gen_upgrade <dir>"
40 inside a tclsh. The method tests will run twice, once for each endianness,
41 and all the databases will be saved in a hierarchy named by <dir>.
42
43 Once the databases have been built, the archives expected by the upgrade tests
44 must be built using the "pack" script, in upgrade/scripts/pack-<version>.pl.
45 This script must be edited slightly to specify the location on a given system
46 of the DB source tree and utilities; it then converts the set of databases
47 under the current working directory into a set of .tar.gz files containing
48 the databases as well as flat files with their contents in item-by-item and
49 db_dump formats.
50
51 How to run the upgrade tests:
52
53 Run "upgrade" from tclsh in the DB build directory. By default, this
54 looks in upgrade/databases, in the DB source tree. An optional first argument
55 can be used to specify an alternate directory.
56
57 A note on 2.X tests:
58
59 The 2.X packing script, as well as a patch against a 2.6.6 test directory
60 to allow it to generate test databases, is in upgrade/generate-2.X.
61
62 Note that the upgrade tests can be *run* on an the 2.X test archives
63 without anything in this directory. It is provided only for
64 archival reasons, in case there is ever reason to generate a new
65 set of test databases.
66
67 XXX: Note also that it quite likely has paths hard-coded for a specific
68 system that is not yours.
69
70 Known Issues:
71
72 1. The following 2.X databases trigger a bug in the db 2.X hash code.
73 This bug affects only empty and near-empty databases, and has been
74 corrected in db 3.X, but it will prevent the following from passing
75 the db_dump test. (They have been removed from the canonical database
76 collection.)
77
78 2.X hash -- test026
79 2.X hash -- test038
80 2.X hash -- test039
81 2.X hash -- test040
82
83 2. The 2.X recno versions of test043 cannot be made to pass the db_dump
84 test because the 2.X version of db_dump has no -k flag and cannot preserve
85 sparsely populated databases.