*I2Berkeley DB: Running the Test Suite[P,

Running the Test Suite



AAll Berkeley DB tests are run from the Tcl front-end application,=dbtest. The dbtest application prompts for input witha percent sign (%).

$To run the entire test suite, enter:#



CThe output from dbtest will be re-directed to a file in the current?directory named ALL.OUT, as running all the tests can+take from a few hours to multiple days.CAfter the test suite has finished, you will get a single message onGthe screen that indicates whether the entire suite succeeded or failed.EIf it failed, the ALL.OUT file will contain details describingAwhat failed. Any errors will appear in that file as output lines beginning with the string: FAIL.

<It is also possible to run tests for a particular subsystem:

$Or to run a single, individual test:



HIn all cases, when not running the entire test suite as described above,Ca successful test run will return you to the dbtest prompt (%). On?failure, you will get a message indicating what failed and why.

GTests are run, by default, in the directory ./TESTDIR. However,?the test files are often very large. To use a differentHdirectory for the test directory, edit the file .dbtestrc in your%build directory, and change the line:



2to a more appropriate value for your system, e.g.:



EAlternatively, you can create a symbolic link named TESTDIR inFyour build directory to an appropriate location for running the tests.

‡WARNING: On many platforms, the mmap(2) and/or fcntl(2) locking system calls won't work correctly over remote filesystemsH(e.g., NFS and AFS), so we strongly recommend that the test directory bea local filesystem.

DThere are two different modes of RECNO access method tests, with andHwithout record renumbering. The test type RECNO is without renumbering,and RRECNO is with renumbering.

5The DB tester currently includes the following tests:45<;<<<<;;44;6I77C=7?8E5C:I>99?E1MFF[1B_FF9a:Sm?y3>YsFe8+*/*p[tY8
Access Method TestsAction
test001Small keys/data
    
  • Put/get per key
  • Dump file, verify
  • Close, reopen
  • Dump file, verify
test002Small keys/medium data
    
  • Put/get per key
  • Dump file, verify
  • Close, reopen
  • Dump file, verify
test003Small keys/large data
    
  • Put/get per key
  • Dump file, verify
  • Close, reopen
  • Dump file, verify
test004Small keys/medium data
    
  • Put/get per key.
  • Sequential (cursor) get/delete and verify
test005Small keys/medium data
    
  • Put/get per key
  • Close, reopen.
  • Sequential (cursor) get/delete and verify
test006Small keys/medium data
    
  • Put/get per key
  • Keyed delete and verify
test007Small keys/medium data
    
  • Put/get per key
  • Close, reopen
  • Keyed delete and verify
test008Small keys/large data
    
  • Put/get per key.
  • Loop through keys by steps (which change)
  • ... delete each key at step
  • ... add each key back
  • ... change step?
  • Tests that overflow pages are getting reused appropriately
test009Small keys/large data
    /
  • Same as test008; close and reopen database
test010Duplicate test
    
  • Small key/data pairs.
test011Duplicate test
    
  • Small key/data pairs.A
  • Test Keyfirst, Keylast, add_before and add_after. To verify9 duplicates onto overflow pages, run with small pagesize.
test012Large keys/small data
    :
  • Same as test003 except use big keys (source files and9 executables) and small data (the file/executable names).
test013Partial put test
    <
  • Overwrite entire records using partial puts. Make sureB that we do not allow overwrites when the NOOVERWRITE flag is set.
test014Exercise partial puts on short data
    <
  • Run 5 combinations of numbers of characters to replace,- and number of times to increase the size by.
test015Partial put test.
    >
  • Partial put teset where the key does not initially exist.
test016Partial put test.
    <
  • Partial put where the datum gets shorter as a result of the put.
test017Basic offpage duplicate test.
    
test018Offpage duplicate test.
    6
  • Key_{first,last,before,after} offpage duplicates.
test019Partial get test.
    
test020In-Memory database tests.
    
test021Btree range tests.
    
test022Multiple data directories test.
    
test023Duplicate test.
    C
  • Exercise deletes and cursor operations within a duplicate set.
test024Record number retrieval test.
    
test025DB_APPEND flag test.
    
test026Small keys/medium data w/duplicates
    
  • Put/get per key.)
  • Loop through keys -- delete each keyA
  • ... test that we are deleting dups correctly with the cursor
test027Off-page duplicate test.
    ?
  • Call test026 with parameters to force off-page duplicates.
test028Cursor delete test.
    9
  • Test put operations after deleting through a cursor.
test029Record renumbering.
    
test030DB_NEXT_DUP functionality
    
test031Duplicate sorting functionality
    
test032DB_GET_BOTH
    
test033DB_GET_BOTH without comparison function
    
test034Test032 with off-page duplicates
    
test035Test033 with off-page duplicates
    
test036Test KEYFIRST and KEYLAST when the key doesn't exist.
    
test037Test DB_RMW
    
test038DB_GET_BOTH on deleted items
    
test039DB_GET_BOTH on deleted items without comparison function
    
test040Test038 with off-page duplicates
    
test041Test039 with off-page duplicates
    
test042Multi-process random test (tests the concurrent DB product)
    e7
  • Tests multiple processes running random operations" concurrently.
test043Recno renumbering and implicit creation test.
    e
test044System integration tests.
    s:
  • Requires proper functioning of the checkpoint daemon, recovery, transactions, etc.n
  • Not run by default.
test045Random tester
    <
  • Runs a number of random add/delete/retrieve operations.7 Tests both successful conditions and error conditions.i
  • Not run by default.
test046Get/Put/Delete operation flags (not yet completed).
    
  • Not run by default.
jointestTests duplicate assisted joins.
    ;
  • Executes 1, 2, 3, and 4 way joins with differing indexc orders and selectivity.
Locking Subsystem TestsAction
lock001Open, close, unlinki?
lock002Gets/Puts. Contention without waiting.n0
lock003Growing a shared region.1
lock004Multi-process lock tests.l6
lock005Multiprocess random lock test.8
Logging Subsystem TestsAction
log001Open, close, unlink.
log002Read/write log records.^
log003Tests multiple logs, truncation, lsn comparison and file functionality.K
log004Verify that log_flush is flushing records correctly. <
Memory Pool Subsystem TestsAction
memp001Randomly updates pages.HX
memp002Tests multiple processes accessing and modifying the same files.<
Transaction Subsystem TestsAction
txn001Open, close, unlink4
txn002Begin, commit, abort testing./
txn003Growing a shared region.:=
Access Method Recovery TestsAction
recd001Per-operation recovery tests for non-duplicate, non-split messages.oE Makes sure that we exercise redo, undo, and do-nothing condition.NH Any test that appears with the message (change state) indicates thatF we've already run the particular test, but we are running it againG so that we can change the state of the data base to prepare for theyA next test (this applies to all other recovery tests as well).h\
recd002Split recovery tests. For every known split log message, makes sure: that we exercise redo, undo, and do-nothing condition.Y
recd003Duplicate recovery tests. For every known duplicate log message,eE makes sure that we exercise redo, undo, and do-nothing condition.lR
recd004Big key test where big key gets elevated to internal page.9
Deadlock detection TestsAction
dead001Use two different configurations to test deadlock detection amongCH a variable number of processes. One configuration has the processesH deadlocked in a ring. The other has the processes all deadlocked on a single resource.Y
dead002Same test as dead001, but use "detect on every collision" insteadd" of separate deadlock detector.*
Bug TestsAction
bug001Cursor maintenance in duplicates.4
bug002Cursor ops not in duplicates.3
bug003Delete with cursor on a key.d4
bug004Delete cursor key and re-add.`
bug005Verify that deleting and readding duplicates results in correct ordering.7
bug006Log prev works across log files. B
bug007Cursor ops work with a partial length of 0.
elrÿÿ;test008Small keys