📄 readme
字号:
The Berkeley DB Upgrade TestsQuick ref: Running the tests: (in tclsh) % source ../test/test.tcl % upgrade Generating the test databases: (in tclsh) % source ../test/test.tcl % gen_upgrade /where/you/want/them (in your shell) $ cd /where/you/want/them $ perl $db_dir/upgrade/scripts/pack-3.0.pl $ mv 3.0 $db_dir/upgrade/databasesWhat they are:The DB upgrade tests are a framework for testing two main features ofBerkeley DB: the db_dump utility, and the "DB_UPGRADE" flag to DB->open.They work by taking a tarred, gzipped set of test databases and dumps, andverifying that the set of items is the same in the original database (asdumped by the version of DB that created it) as in the upgraded one,and is the same in the original database and in a new database generated bydb_loading a db_dump.In db 3.X and higher, the upgrade test is repeated on a database withthe opposite endianness to the system the database was generated on.How to generate test databases:Ordinarily, this is something that only very rarely has to occur;an archive of upgrade test databases can and should be kept, so ideallythe generation step only needs to be done once for each major DB release.To generate the test databases, execute the command "gen_upgrade <dir>"inside a tclsh. The method tests will run twice, once for each endianness,and all the databases will be saved in a hierarchy named by <dir>.Once the databases have been built, the archives expected by the upgrade testsmust be built using the "pack" script, in upgrade/scripts/pack-<version>.pl.This script must be edited slightly to specify the location on a given systemof the DB source tree and utilities; it then converts the set of databasesunder the current working directory into a set of .tar.gz files containingthe databases as well as flat files with their contents in item-by-item anddb_dump formats.How to run the upgrade tests:Run "upgrade" from tclsh in the DB build directory. By default, thislooks in upgrade/databases, in the DB source tree. An optional first argumentcan be used to specify an alternate directory.A note on 2.X tests:The 2.X packing script, as well as a patch against a 2.6.6 test directoryto allow it to generate test databases, is in upgrade/generate-2.X.Note that the upgrade tests can be *run* on an the 2.X test archiveswithout anything in this directory. It is provided only forarchival reasons, in case there is ever reason to generate a newset of test databases.XXX: Note also that it quite likely has paths hard-coded for a specificsystem that is not yours.Known Issues:1. The following 2.X databases trigger a bug in the db 2.X hash code.This bug affects only empty and near-empty databases, and has beencorrected in db 3.X, but it will prevent the following from passingthe db_dump test. (They have been removed from the canonical databasecollection.) 2.X hash -- test026 2.X hash -- test038 2.X hash -- test039 2.X hash -- test0402. The 2.X recno versions of test043 cannot be made to pass the db_dumptest because the 2.X version of db_dump has no -k flag and cannot preservesparsely populated databases.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -