📄 tests
字号:
client. Shut down, then run catastrophic recovery in the logs-only client and check that the database is present and populated.=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=rep005 Replication election test with error handling. Run a modified version of test001 in a replicated master environment; hold an election among a group of clients to make sure they select a proper master from amongst themselves, forcing errors at various locations in the election path.=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=rpc001 Test RPC server timeouts for cursor, txn and env handles. Test RPC specifics, primarily that unsupported functions return errors and such.=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=rpc002 Test invalid RPC functions and make sure we error them correctly=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=rpc004 Test RPC server and security=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=rpc005 Test RPC server handle ID sharing=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=rsrc001 Recno backing file test. Try different patterns of adding records and making sure that the corresponding file matches.=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=rsrc002 Recno backing file test #2: test of set_re_delim. Specify a backing file with colon-delimited records, and make sure they are correctly interpreted.=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=rsrc003 Recno backing file test. Try different patterns of adding records and making sure that the corresponding file matches.=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=rsrc004 Recno backing file test for EOF-terminated records.=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=scr### The scr### directories are shell scripts that test a variety of things, including things about the distribution itself. These tests won't run on most systems, so don't even try to run them.=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=sdbtest001 Tests multiple access methods in one subdb Open several subdbs, each with a different access method Small keys, small data Put/get per key per subdb Dump file, verify per subdb Close, reopen per subdb Dump file, verify per subdb Make several subdb's of different access methods all in one DB. Rotate methods and repeat [#762]. Use the first 10,000 entries from the dictionary. Insert each with self as key and data; retrieve each. After all are entered, retrieve all; compare output to original. Close file, reopen, do retrieve and re-verify.=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=sdbtest002 Tests multiple access methods in one subdb access by multiple processes. Open several subdbs, each with a different access method Small keys, small data Put/get per key per subdb Fork off several child procs to each delete selected data from their subdb and then exit Dump file, verify contents of each subdb is correct Close, reopen per subdb Dump file, verify per subdb Make several subdb's of different access methods all in one DB. Fork of some child procs to each manipulate one subdb and when they are finished, verify the contents of the databases. Use the first 10,000 entries from the dictionary. Insert each with self as key and data; retrieve each. After all are entered, retrieve all; compare output to original. Close file, reopen, do retrieve and re-verify.=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=sec001 Test of security interface=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=sec002 Test of security interface and catching errors in the face of attackers overwriting parts of existing files.=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=sindex001 Basic secondary index put/delete test=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=sindex002 Basic cursor-based secondary index put/delete test=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=sindex003 sindex001 with secondaries created and closed mid-test Basic secondary index put/delete test with secondaries created mid-test.=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=sindex004 sindex002 with secondaries created and closed mid-test Basic cursor-based secondary index put/delete test, with secondaries created mid-test.=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=sindex006 Basic secondary index put/delete test with transactions=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=subdb001 Tests mixing db and subdb operations Tests mixing db and subdb operations Create a db, add data, try to create a subdb. Test naming db and subdb with a leading - for correct parsing Existence check -- test use of -excl with subdbs Test non-subdb and subdb operations Test naming (filenames begin with -) Test existence (cannot create subdb of same name with -excl)=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=subdb002 Tests basic subdb functionality Small keys, small data Put/get per key Dump file Close, reopen Dump file Use the first 10,000 entries from the dictionary. Insert each with self as key and data; retrieve each. After all are entered, retrieve all; compare output to original. Close file, reopen, do retrieve and re-verify. Then repeat using an environment.=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=subdb003 Tests many subdbs Creates many subdbs and puts a small amount of data in each (many defaults to 2000) Use the first 10,000 entries from the dictionary as subdbnames. Insert each with entry as name of subdatabase and a partial list as key/data. After all are entered, retrieve all; compare output to original. Close file, reopen, do retrieve and re-verify.=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=subdb004 Tests large subdb names subdb name = filecontents, key = filename, data = filecontents Put/get per key Dump file Dump subdbs, verify data and subdb name match Create 1 db with many large subdbs. Use the contents as subdb names. Take the source files and dbtest executable and enter their names as the key with their contents as data. After all are entered, retrieve all; compare output to original. Close file, reopen, do retrieve and re-verify.=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=subdb005 Tests cursor operations in subdbs Put/get per key Verify cursor operations work within subdb Verify cursor operations do not work across subdbs=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=subdb006 Tests intra-subdb join We'll test 2-way, 3-way, and 4-way joins and figure that if those work, everything else does as well. We'll create test databases called sub1.db, sub2.db, sub3.db, and sub4.db. The number on the database describes the duplication -- duplicates are of the form 0, N, 2N, 3N, ... where N is the number of the database. Primary.db is the primary database, and sub0.db is the database that has no matching duplicates. All of these are within a single database.=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=subdb007 Tests page size difference errors between subdbs. Test 3 different scenarios for page sizes. 1. Create/open with a default page size, 2nd subdb create with specified different one, should error. 2. Create/open with specific page size, 2nd subdb create with different one, should error. 3. Create/open with specified page size, 2nd subdb create with same specified size, should succeed. (4th combo of using all defaults is a basic test, done elsewhere)=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=subdb008 Tests lorder difference errors between subdbs. Test 3 different scenarios for lorder. 1. Create/open with specific lorder, 2nd subdb create with different one, should error. 2. Create/open with a default lorder 2nd subdb create with specified different one, should error. 3. Create/open with specified lorder, 2nd subdb create with same specified lorder, should succeed. (4th combo of using all defaults is a basic test, done elsewhere)=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=subdb009 Test DB->rename() method for subdbs=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=subdb010 Test DB->remove() method and DB->truncate() for subdbs=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=subdb011 Test deleting Subdbs with overflow pages Create 1 db with many large subdbs. Test subdatabases with overflow pages.=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=subdb012 Test subdbs with locking and transactions Tests creating and removing subdbs while handles are open works correctly, and in the face of txns.=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=test001 Small keys/data Put/get per key Dump file Close, reopen Dump file Use the first 10,000 entries from the dictionary. Insert each with self as key and data; retrieve each. After all are entered, retrieve all; compare output to original. Close file, reopen, do retrieve and re-verify.=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=test002 Small keys/medium data Put/get per key Dump file Close, reopen Dump file Use the first 10,000 entries from the dictionary. Insert each with self as key and a fixed, medium length data string; retrieve each. After all are entered, retrieve all; compare output to original. Close file, reopen, do retrieve and re-verify.=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=test003 Small keys/large data Put/get per key Dump file Close, reopen Dump file Take the source files and dbtest executable and enter their names as the key with their contents as data. After all are entered, retrieve all; compare output to original. Close file, reopen, do retrieve and re-verify.=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=test004 Small keys/medium data Put/get per key Sequential (cursor) get/delete Check that cursor operations work. Create a database. Read through the database sequentially using cursors and delete each element.=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=test005 Small keys/medium data Put/get per key Close, reopen Sequential (cursor) get/delete Check that cursor operations work. Create a database; close it and reopen it. Then read through the database sequentially using cursors and delete each element.=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=test006 Small keys/medium data Put/get per key Keyed delete and verify Keyed delete test. Create database. Go through database, deleting all entries by key.=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=test007 Small keys/medium data Put/get per key Close, reopen Keyed delete Check that delete operations work. Create a database; close database and reopen it. Then issues delete by key for each entry.=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=test008 Small 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 Confirm that overflow pages are getting reused Take the source files and dbtest executable and enter their names as the key with their contents as data. After all are entered, begin looping through the entries; deleting some pairs and then readding them.=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=test009 Small keys/large data Same as test008; close and reopen database Check that we reuse overflow pages. Create database with lots of big key/data pairs. Go through and delete and add keys back randomly. Then close the DB and make sure that we have everything we think we should.=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=test010 Duplicate test Small key/data pairs. Use the first 10,000 entries from the dictionary. Insert each with self as key and data; add duplicate records for each. After all are entered, retrieve all; verify output. Close file, reopen, do retrieve and re-verify. This does not work for recno=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -