summaryrefslogtreecommitdiff
path: root/db/test
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2002-09-19 21:06:40 +0000
committerjbj <devnull@localhost>2002-09-19 21:06:40 +0000
commit2376437b8faec79eb8ccaa874f271d4ee69d276f (patch)
treefc29754122bfce5816757e4c77f781c52a4d75c4 /db/test
parent4a15060bcbf38c550f7dcc86ceff277854f9eecf (diff)
downloadrpm-2376437b8faec79eb8ccaa874f271d4ee69d276f.tar.gz
rpm-2376437b8faec79eb8ccaa874f271d4ee69d276f.tar.bz2
rpm-2376437b8faec79eb8ccaa874f271d4ee69d276f.zip
Conflict resolved.
CVS patchset: 5722 CVS date: 2002/09/19 21:06:40
Diffstat (limited to 'db/test')
-rw-r--r--db/test/parallel.tcl80
-rw-r--r--db/test/recd016.tcl6
-rw-r--r--db/test/rep001.tcl2
-rw-r--r--db/test/scr010/spell.ok3
-rw-r--r--db/test/scr013/chk.stats26
-rw-r--r--db/test/scr016/CallbackTest.testout4
-rw-r--r--db/test/scr016/TestAppendRecno.java5
-rw-r--r--db/test/scr016/TestAssociate.java12
-rw-r--r--db/test/scr016/TestConstruct02.java115
-rw-r--r--db/test/scr016/TestDbtFlags.java24
-rw-r--r--db/test/scr016/TestDbtFlags.testerr58
-rw-r--r--db/test/scr016/TestDbtFlags.testout114
-rw-r--r--db/test/scr016/TestKeyRange.java4
-rw-r--r--db/test/scr016/TestLockVec.java6
-rw-r--r--db/test/scr016/TestLogc.java6
-rw-r--r--db/test/scr016/TestOpenEmpty.java4
-rw-r--r--db/test/scr016/TestSimpleAccess.java37
-rw-r--r--db/test/scr016/chk.javatests5
-rw-r--r--db/test/scr016/ignore13
-rw-r--r--db/test/scr016/testone8
-rw-r--r--db/test/test096.tcl4
21 files changed, 302 insertions, 234 deletions
diff --git a/db/test/parallel.tcl b/db/test/parallel.tcl
index 9080b2b0d..919dcaae9 100644
--- a/db/test/parallel.tcl
+++ b/db/test/parallel.tcl
@@ -1,5 +1,5 @@
# Code to load up the tests in to the Queue database
-# Id: parallel.tcl,v 11.23 2002/08/08 19:25:39 sue Exp
+# Id: parallel.tcl,v 11.28 2002/09/05 17:23:06 sandstro Exp
proc load_queue { file {dbdir RUNQUEUE} nitems } {
puts -nonewline "Loading run queue with $nitems items..."
@@ -78,7 +78,7 @@ proc run_parallel { nprocs {list run_all} {nitems ALL} } {
set basedir [pwd]
set pidlist {}
- set queuedir ../../[string range $basedir \
+ set queuedir ../../[string range $basedir \
[string last "/" $basedir] end]/$queuedir
for { set i 1 } { $i <= $nprocs } { incr i } {
@@ -87,11 +87,12 @@ proc run_parallel { nprocs {list run_all} {nitems ALL} } {
set p [exec $tclsh_path << \
"source $test_path/test.tcl;\
run_queue $i $basename.$i $queuedir $nitems" &]
+ lappend pidlist $p
set f [open $testdir/begin.$p w]
close $f
} res]
}
- watch_procs 300 360000
+ watch_procs $pidlist 300 360000
set failed 0
for { set i 1 } { $i <= $nprocs } { incr i } {
@@ -155,6 +156,9 @@ proc run_queue { i rundir queuedir nitems } {
close $o
}
env_cleanup $testdir
+ set o [open $builddir/ALL.OUT.$i a]
+ puts $o "\nEnding record $num ([timestamp])\n"
+ close $o
incr count
} else {
incr waitcnt
@@ -168,6 +172,15 @@ proc run_queue { i rundir queuedir nitems } {
$db close
$dbenv close
+ #
+ # We need to put the pid file in the builddir's idea
+ # of testdir, not this child process' local testdir.
+ # Therefore source builddir's include.tcl to get its
+ # testdir.
+ # !!! This resets testdir, so don't do anything else
+ # local to the child after this.
+ source $builddir/include.tcl
+
set f [open $builddir/$testdir/end.[pid] w]
close $f
}
@@ -208,8 +221,8 @@ proc mkparalleldirs { nprocs basename queuedir } {
regsub {test_path } $d {test_path ../} d
regsub {src_root } $d {src_root ../} d
- set tdir "testdir ./TESTDIR.$i"
- regsub {testdir \./TESTDIR} $d $tdir d
+ set tdir "TESTDIR.$i"
+ regsub -all {TESTDIR} $d $tdir d
regsub {KILL \.} $d {KILL ..} d
set outfile [open $destdir/include.tcl w]
puts $outfile $d
@@ -223,3 +236,60 @@ proc mkparalleldirs { nprocs basename queuedir } {
}
}
}
+
+proc run_ptest { nprocs test args } {
+ global parms
+ set basename ./PARALLEL_TESTDIR
+ set queuedir NULL
+ source ./include.tcl
+
+ mkparalleldirs $nprocs $basename $queuedir
+
+ if { [info exists parms($test)] } {
+ foreach method \
+ "hash queue queueext recno rbtree frecno rrecno btree" {
+ if { [eval exec_ptest $nprocs $basename \
+ $test $method $args] != 0 } {
+ break
+ }
+ }
+ } else {
+ eval exec_ptest $nprocs $basename $test $args
+ }
+}
+
+proc exec_ptest { nprocs basename test args } {
+ source ./include.tcl
+
+ set basedir [pwd]
+ set pidlist {}
+ puts "Running $nprocs parallel runs of $test"
+ for { set i 1 } { $i <= $nprocs } { incr i } {
+ set outf ALL.OUT.$i
+ fileremove -f $outf
+ set ret [catch {
+ set p [exec $tclsh_path << \
+ "cd $basename.$i;\
+ source ../$test_path/test.tcl;\
+ $test $args" >& $outf &]
+ lappend pidlist $p
+ set f [open $testdir/begin.$p w]
+ close $f
+ } res]
+ }
+ watch_procs $pidlist 30 36000
+ set failed 0
+ for { set i 1 } { $i <= $nprocs } { incr i } {
+ if { [check_failed_run ALL.OUT.$i] != 0 } {
+ set failed 1
+ puts "Test $test failed in process $i."
+ }
+ }
+ if { $failed == 0 } {
+ puts "Test $test succeeded all processes"
+ return 0
+ } else {
+ puts "Test failed: stopping"
+ return 1
+ }
+}
diff --git a/db/test/recd016.tcl b/db/test/recd016.tcl
index 1b50f2169..e76cba059 100644
--- a/db/test/recd016.tcl
+++ b/db/test/recd016.tcl
@@ -3,7 +3,7 @@
# Copyright (c) 1999-2002
# Sleepycat Software. All rights reserved.
#
-# Id: recd016.tcl,v 11.6 2002/05/24 16:14:15 sue Exp
+# Id: recd016.tcl,v 11.8 2002/09/05 17:23:07 sandstro Exp
#
# TEST recd016
# TEST This is a recovery test for testing running recovery while
@@ -16,6 +16,8 @@ proc recd016 { method args } {
set omethod [convert_method $method]
puts "Recd016: $method ($args) simultaneous recovery test"
+ puts "Recd016: Skipping; waiting on SR #6277"
+ return
# Create the database and environment.
set testfile recd016.db
@@ -115,7 +117,7 @@ proc recd016 { method args } {
set p [exec $util_path/db_recover -h $testdir -c &]
lappend pidlist $p
}
- watch_procs 5
+ watch_procs $pidlist 5
#
# Now that they are all done run recovery correctly
puts "\tRecd016.d: Run recovery process"
diff --git a/db/test/rep001.tcl b/db/test/rep001.tcl
index b89cef418..ea552d118 100644
--- a/db/test/rep001.tcl
+++ b/db/test/rep001.tcl
@@ -3,7 +3,7 @@
# Copyright (c) 2001-2002
# Sleepycat Software. All rights reserved.
#
-# Id: rep001.tcl,v 1.14 2002/08/08 18:13:12 sue Exp
+# Id: rep001.tcl,v 1.16 2002/08/26 17:52:19 margo Exp
#
# TEST rep001
# TEST Replication rename and forced-upgrade test.
diff --git a/db/test/scr010/spell.ok b/db/test/scr010/spell.ok
index 2211d46b8..18af8d130 100644
--- a/db/test/scr010/spell.ok
+++ b/db/test/scr010/spell.ok
@@ -35,6 +35,7 @@ ClassNotFoundException
Config
DBC
DBENV
+DBP
DBS
DBSDIR
DBT
@@ -175,6 +176,7 @@ OutputStream
PGNO
PID
PREV
+Pgno
RECNO
RECNOSYNC
RECNUM
@@ -211,6 +213,7 @@ TestLogc
TpcbExample
Tt
Txn
+Txnid
Txns
UID
UNAVAIL
diff --git a/db/test/scr013/chk.stats b/db/test/scr013/chk.stats
index db87ec3c5..2f752e1c2 100644
--- a/db/test/scr013/chk.stats
+++ b/db/test/scr013/chk.stats
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# Id: chk.stats,v 1.5 2002/03/27 04:33:04 bostic Exp
+# Id: chk.stats,v 1.6 2002/08/19 18:35:18 bostic Exp
#
# Check to make sure all of the stat structure members are included in
# all of the possible formats.
@@ -58,19 +58,19 @@ inc()
}
inc "__db_bt_stat" \
- "tcl/tcl_db.c db_stat/db_stat.c docs_src/api_c/db_stat.so"
+ "tcl/tcl_db.c db_stat/db_stat.c docs_src/db/db_stat.so"
inc "__db_h_stat" \
- "tcl/tcl_db.c db_stat/db_stat.c docs_src/api_c/db_stat.so"
+ "tcl/tcl_db.c db_stat/db_stat.c docs_src/db/db_stat.so"
inc "__db_qam_stat" \
- "tcl/tcl_db.c db_stat/db_stat.c docs_src/api_c/db_stat.so"
+ "tcl/tcl_db.c db_stat/db_stat.c docs_src/db/db_stat.so"
inc __db_lock_stat \
- "tcl/tcl_lock.c db_stat/db_stat.c docs_src/api_c/lock_stat.so"
+ "tcl/tcl_lock.c db_stat/db_stat.c docs_src/lock/lock_stat.so"
inc __db_log_stat \
- "tcl/tcl_log.c db_stat/db_stat.c docs_src/api_c/log_stat.so"
+ "tcl/tcl_log.c db_stat/db_stat.c docs_src/log/log_stat.so"
inc __db_mpool_stat \
- "tcl/tcl_mp.c db_stat/db_stat.c docs_src/api_c/memp_stat.so"
+ "tcl/tcl_mp.c db_stat/db_stat.c docs_src/memp/memp_stat.so"
inc __db_txn_stat \
- "tcl/tcl_txn.c db_stat/db_stat.c docs_src/api_c/txn_stat.so"
+ "tcl/tcl_txn.c db_stat/db_stat.c docs_src/txn/txn_stat.so"
# Check to make sure the elements from a man page appears in db.in.
man()
@@ -90,25 +90,25 @@ man()
}
sed -e '/m4_stat(/!d' \
- -e 's/.*m4_stat(\([^)]*\)).*/\1/' < $d/docs_src/api_c/db_stat.so > $t
+ -e 's/.*m4_stat(\([^)]*\)).*/\1/' < $d/docs_src/db/db_stat.so > $t
man "checking db_stat.so against db.h"
sed -e '/m4_stat(/!d' \
-e 's/.*m4_stat(\([^)]*\)).*/\1/' \
- -e 's/.* //' < $d/docs_src/api_c/lock_stat.so > $t
+ -e 's/.* //' < $d/docs_src/lock/lock_stat.so > $t
man "checking lock_stat.so against db.h"
sed -e '/m4_stat[12](/!d' \
- -e 's/.*m4_stat[12](\([^)]*\)).*/\1/' < $d/docs_src/api_c/log_stat.so > $t
+ -e 's/.*m4_stat[12](\([^)]*\)).*/\1/' < $d/docs_src/log/log_stat.so > $t
man "checking log_stat.so against db.h"
sed -e '/m4_stat[123](/!d' \
- -e 's/.*m4_stat[123](\([^)]*\)).*/\1/' < $d/docs_src/api_c/memp_stat.so > $t
+ -e 's/.*m4_stat[123](\([^)]*\)).*/\1/' < $d/docs_src/memp/memp_stat.so > $t
man "checking memp_stat.so against db.h"
sed -e '/m4_stat(/!d' \
-e 's/.*m4_stat(.*, \([^)]*\)).*/\1/' \
- -e 's/__[LR]B__//g' < $d/docs_src/api_c/txn_stat.so > $t
+ -e 's/__[LR]B__//g' < $d/docs_src/txn/txn_stat.so > $t
man "checking txn_stat.so against db.h"
exit $exitv
diff --git a/db/test/scr016/CallbackTest.testout b/db/test/scr016/CallbackTest.testout
index 23cd113a7..68797d4a2 100644
--- a/db/test/scr016/CallbackTest.testout
+++ b/db/test/scr016/CallbackTest.testout
@@ -35,6 +35,10 @@ compare function called
key8, key6
put 1
compare function called
+ key1, key9
+compare function called
+ key1, key0
+compare function called
key1, key5
compare function called
key1, key2
diff --git a/db/test/scr016/TestAppendRecno.java b/db/test/scr016/TestAppendRecno.java
index 56cfe6465..6caf576f9 100644
--- a/db/test/scr016/TestAppendRecno.java
+++ b/db/test/scr016/TestAppendRecno.java
@@ -4,7 +4,7 @@
* Copyright (c) 1997-2002
* Sleepycat Software. All rights reserved.
*
- * Id: TestAppendRecno.java,v 1.3 2002/01/11 15:54:01 bostic Exp
+ * Id: TestAppendRecno.java,v 1.4 2002/08/16 19:35:53 dda Exp
*/
package com.sleepycat.test;
@@ -64,10 +64,9 @@ public class TestAppendRecno
table = new Db(null, 0);
table.set_error_stream(System.err);
table.set_errpfx("TestAppendRecno");
- //table.open(FileName, null, Db.DB_BTREE, Db.DB_CREATE, 0644);
table.set_append_recno(this);
- table.open(FileName, null, Db.DB_RECNO, Db.DB_CREATE, 0644);
+ table.open(null, FileName, null, Db.DB_RECNO, Db.DB_CREATE, 0644);
for (int i=0; i<10; i++) {
System.out.println("\n*** Iteration " + i );
try {
diff --git a/db/test/scr016/TestAssociate.java b/db/test/scr016/TestAssociate.java
index 83b5438d9..9c2ec891b 100644
--- a/db/test/scr016/TestAssociate.java
+++ b/db/test/scr016/TestAssociate.java
@@ -4,7 +4,7 @@
* Copyright (c) 1997-2002
* Sleepycat Software. All rights reserved.
*
- * Id: TestAssociate.java,v 1.3 2002/01/11 15:54:01 bostic Exp
+ * Id: TestAssociate.java,v 1.4 2002/08/16 19:35:54 dda Exp
*/
package com.sleepycat.test;
@@ -122,9 +122,8 @@ public class TestAssociate
(new java.io.File(FileName)).delete();
Db table = new Db(dbenv, 0);
Db table2 = new Db(dbenv, 0);
- table.set_dup_compare(this);
table2.set_dup_compare(this);
- table2.set_flags(Db.DB_DUP | Db.DB_DUPSORT);
+ table2.set_flags(Db.DB_DUPSORT);
table.set_error_stream(System.err);
table2.set_error_stream(System.err);
table.set_errpfx("TestAssociate");
@@ -133,9 +132,10 @@ public class TestAssociate
System.out.println("Secondary database is " + shownull(table2));
saveddb1 = table;
saveddb2 = table2;
- table.open(FileName, null, Db.DB_BTREE, Db.DB_CREATE, 0644);
- table2.open(FileName + "2", null, Db.DB_BTREE, Db.DB_CREATE, 0644);
- table.associate(table2, new Capitalize(), 0);
+ table.open(null, FileName, null, Db.DB_BTREE, Db.DB_CREATE, 0644);
+ table2.open(null, FileName + "2", null,
+ Db.DB_BTREE, Db.DB_CREATE, 0644);
+ table.associate(null, table2, new Capitalize(), 0);
//
// Insert records into the database, where the key is the user
diff --git a/db/test/scr016/TestConstruct02.java b/db/test/scr016/TestConstruct02.java
index 91c47a3ca..fa4b28aef 100644
--- a/db/test/scr016/TestConstruct02.java
+++ b/db/test/scr016/TestConstruct02.java
@@ -4,7 +4,7 @@
* Copyright (c) 2000-2002
* Sleepycat Software. All rights reserved.
*
- * Id: TestConstruct02.java,v 1.5 2002/01/23 14:29:51 bostic Exp
+ * Id: TestConstruct02.java,v 1.6 2002/08/16 19:35:54 dda Exp
*/
/*
@@ -95,6 +95,8 @@ public class TestConstruct02
void rundb(Db db, int count)
throws DbException, FileNotFoundException
{
+ if (count >= 64)
+ throw new IllegalArgumentException("rundb count arg >= 64");
// The bit map of keys we've seen
long bitmap = 0;
@@ -106,20 +108,12 @@ public class TestConstruct02
int i;
for (i=0; i<count; i++) {
outbuf[i] = (byte)('0' + i);
- //outbuf[i] = System.out.println((byte)('0' + i);
}
outbuf[i++] = (byte)'x';
- /*
- System.out.println("byte: " + ('0' + 0) + ", after: " +
- (int)'0' + "=" + (int)('0' + 0) +
- "," + (byte)outbuf[0]);
- */
-
Dbt key = new Dbt(outbuf, 0, i);
Dbt data = new Dbt(outbuf, 0, i);
- //DEBUGOUT("Put: " + (char)outbuf[0] + ": " + new String(outbuf));
db.put(null, key, data, Db.DB_NOOVERWRITE);
// Acquire a cursor for the table.
@@ -133,23 +127,31 @@ public class TestConstruct02
readkey.set_flags(Db.DB_DBT_MALLOC);
readdata.set_flags(Db.DB_DBT_MALLOC);
- //DEBUGOUT("Dbc.get");
while (dbcp.get(readkey, readdata, Db.DB_NEXT) == 0) {
- String key_string = new String(readkey.get_data());
- String data_string = new String(readdata.get_data());
+ byte[] key_bytes = readkey.get_data();
+ byte[] data_bytes = readdata.get_data();
- //DEBUGOUT("Got: " + key_string + ": " + data_string);
- int len = key_string.length();
- if (len <= 0 || key_string.charAt(len-1) != 'x') {
+ int len = key_bytes.length;
+ if (len != data_bytes.length) {
+ ERR("key and data are different");
+ }
+ for (i=0; i<len-1; i++) {
+ byte want = (byte)('0' + i);
+ if (key_bytes[i] != want || data_bytes[i] != want) {
+ System.out.println(" got " + new String(key_bytes) +
+ "/" + new String(data_bytes));
+ ERR("key or data is corrupt");
+ }
+ }
+ if (len <= 0 ||
+ key_bytes[len-1] != (byte)'x' ||
+ data_bytes[len-1] != (byte)'x') {
ERR("reread terminator is bad");
}
len--;
long bit = (1 << len);
if (len > count) {
- ERR("reread length is bad: expect " + count + " got "+ len + " (" + key_string + ")" );
- }
- else if (!data_string.equals(key_string)) {
- ERR("key/data don't match");
+ ERR("reread length is bad: expect " + count + " got "+ len);
}
else if ((bitmap & bit) != 0) {
ERR("key already seen");
@@ -157,23 +159,12 @@ public class TestConstruct02
else if ((expected & bit) == 0) {
ERR("key was not expected");
}
- else {
- bitmap |= bit;
- expected &= ~(bit);
- for (i=0; i<len; i++) {
- if (key_string.charAt(i) != ('0' + i)) {
- System.out.print(" got " + key_string
- + " (" + (int)key_string.charAt(i)
- + "), wanted " + i
- + " (" + (int)('0' + i)
- + ") at position " + i + "\n");
- ERR("key is corrupt");
- }
- }
- }
+ bitmap |= bit;
+ expected &= ~(bit);
}
if (expected != 0) {
- System.out.print(" expected more keys, bitmap is: " + expected + "\n");
+ System.out.print(" expected more keys, bitmap is: " +
+ expected + "\n");
ERR("missing keys in database");
}
dbcp.close();
@@ -242,25 +233,14 @@ public class TestConstruct02
}
}
- boolean doall(int mask)
+ boolean doall()
{
itemcount = 0;
try {
- for (int item=1; item<32; item++) {
- if ((mask & (1 << item)) != 0) {
- VERBOSEOUT(" Running test " + item + ":\n");
- switch (item) {
- case 1:
- t1();
- break;
- default:
- ERR("unknown test case: " + item);
- break;
- }
- VERBOSEOUT(" finished.\n");
- }
- }
- removeall((mask & 1) != 0, false);
+ VERBOSEOUT(" Running test 1:\n");
+ t1();
+ VERBOSEOUT(" finished.\n");
+ removeall(true, false);
return true;
}
catch (DbException dbe) {
@@ -275,38 +255,17 @@ public class TestConstruct02
public static void main(String args[])
{
int iterations = 200;
- int mask = 0x3;
for (int argcnt=0; argcnt<args.length; argcnt++) {
String arg = args[argcnt];
- if (arg.charAt(0) == '-') {
- // keep on lower bit, which means to remove db between tests.
- mask = 1;
- for (int pos=1; pos<arg.length(); pos++) {
- char ch = arg.charAt(pos);
- if (ch >= '0' && ch <= '9') {
- mask |= (1 << (ch - '0'));
- }
- else if (ch == 'v') {
- verbose_flag = true;
- }
- else {
- ERR("Usage: construct02 [-testdigits] count");
- }
+ try {
+ iterations = Integer.parseInt(arg);
+ if (iterations < 0) {
+ ERR("Usage: construct02 [-testdigits] count");
}
- System.out.println("mask = " + mask);
-
}
- else {
- try {
- iterations = Integer.parseInt(arg);
- if (iterations < 0) {
- ERR("Usage: construct02 [-testdigits] count");
- }
- }
- catch (NumberFormatException nfe) {
- ERR("EXCEPTION RECEIVED: " + nfe);
- }
+ catch (NumberFormatException nfe) {
+ ERR("EXCEPTION RECEIVED: " + nfe);
}
}
@@ -334,7 +293,7 @@ public class TestConstruct02
VERBOSEOUT("(" + i + "/" + iterations + ") ");
}
VERBOSEOUT("construct02 running:\n");
- if (!con.doall(mask)) {
+ if (!con.doall()) {
ERR("SOME TEST FAILED");
}
System.gc();
diff --git a/db/test/scr016/TestDbtFlags.java b/db/test/scr016/TestDbtFlags.java
index 0c30d8c07..469b8f0ff 100644
--- a/db/test/scr016/TestDbtFlags.java
+++ b/db/test/scr016/TestDbtFlags.java
@@ -4,7 +4,7 @@
* Copyright (c) 1997-2002
* Sleepycat Software. All rights reserved.
*
- * Id: TestDbtFlags.java,v 1.3 2002/01/11 15:54:02 bostic Exp
+ * Id: TestDbtFlags.java,v 1.4 2002/08/16 19:35:54 dda Exp
*/
package com.sleepycat.test;
@@ -25,14 +25,18 @@ public class TestDbtFlags
/*zippy quotes for test input*/
static final String[] input_lines = {
- "I'm having a RELIGIOUS EXPERIENCE.. and I don't take any DRUGS",
- "I pretend I'm living in a styrofoam packing crate, high in th'" +
- "SWISS ALPS, still unable to accept th' idea of TOUCH-TONE DIALING!!",
- "FUN is never having to say you're SUSHI!!",
- "Hold the MAYO & pass the COSMIC AWARENESS...",
- "What GOOD is a CARDBOARD suitcase ANYWAY?",
- "My nose feels like a bad Ronald Reagan movie...",
- "The LOGARITHM of an ISOCELES TRIANGLE is TUESDAY WELD!!",
+ "If we shadows have offended",
+ "Think but this, and all is mended",
+ "That you have but slumber'd here",
+ "While these visions did appear",
+ "And this weak and idle theme",
+ "No more yielding but a dream",
+ "Gentles, do not reprehend",
+ "if you pardon, we will mend",
+ "And, as I am an honest Puck, if we have unearned luck",
+ "Now to 'scape the serpent's tongue, we will make amends ere long;",
+ "Else the Puck a liar call; so, good night unto you all.",
+ "Give me your hands, if we be friends, and Robin shall restore amends."
};
public TestDbtFlags(int flag_value, int buf_size)
@@ -95,7 +99,7 @@ public class TestDbtFlags
Db table = new Db(null, 0);
table.set_error_stream(System.err);
table.set_errpfx("TestDbtFlags");
- table.open(FileName, null, Db.DB_BTREE, Db.DB_CREATE, 0644);
+ table.open(null, FileName, null, Db.DB_BTREE, Db.DB_CREATE, 0644);
//
// Insert records into the database, where the key is the user
diff --git a/db/test/scr016/TestDbtFlags.testerr b/db/test/scr016/TestDbtFlags.testerr
index 1f8cb2a55..7666868eb 100644
--- a/db/test/scr016/TestDbtFlags.testerr
+++ b/db/test/scr016/TestDbtFlags.testerr
@@ -2,35 +2,53 @@
=-=-=-= Test with DBT flags 16 bufsize -1
=-=-=-= Test with DBT flags 32 bufsize 20
exception, iteration 0: Dbt not large enough for available data
- key size: 41 ulen: 20
- data size: 41 ulen: 20
+ key size: 28 ulen: 20
+ data size: 28 ulen: 20
exception, iteration 1: Dbt not large enough for available data
- key size: 44 ulen: 20
- data size: 44 ulen: 20
+ key size: 53 ulen: 20
+ data size: 53 ulen: 20
exception, iteration 2: Dbt not large enough for available data
- key size: 129 ulen: 20
- data size: 129 ulen: 20
+ key size: 55 ulen: 20
+ data size: 55 ulen: 20
exception, iteration 3: Dbt not large enough for available data
- key size: 63 ulen: 20
- data size: 63 ulen: 20
+ key size: 25 ulen: 20
+ data size: 25 ulen: 20
exception, iteration 4: Dbt not large enough for available data
- key size: 47 ulen: 20
- data size: 47 ulen: 20
+ key size: 69 ulen: 20
+ data size: 69 ulen: 20
exception, iteration 5: Dbt not large enough for available data
- key size: 55 ulen: 20
- data size: 55 ulen: 20
+ key size: 27 ulen: 20
+ data size: 27 ulen: 20
exception, iteration 6: Dbt not large enough for available data
- key size: 41 ulen: 20
- data size: 41 ulen: 20
+ key size: 28 ulen: 20
+ data size: 28 ulen: 20
+exception, iteration 7: Dbt not large enough for available data
+ key size: 65 ulen: 20
+ data size: 65 ulen: 20
+exception, iteration 8: Dbt not large enough for available data
+ key size: 32 ulen: 20
+ data size: 32 ulen: 20
+exception, iteration 9: Dbt not large enough for available data
+ key size: 33 ulen: 20
+ data size: 33 ulen: 20
+exception, iteration 10: Dbt not large enough for available data
+ key size: 30 ulen: 20
+ data size: 30 ulen: 20
+exception, iteration 11: Dbt not large enough for available data
+ key size: 27 ulen: 20
+ data size: 27 ulen: 20
=-=-=-= Test with DBT flags 32 bufsize 50
+exception, iteration 1: Dbt not large enough for available data
+ key size: 53 ulen: 50
+ data size: 53 ulen: 50
exception, iteration 2: Dbt not large enough for available data
- key size: 129 ulen: 50
- data size: 129 ulen: 50
-exception, iteration 3: Dbt not large enough for available data
- key size: 63 ulen: 50
- data size: 63 ulen: 50
-exception, iteration 5: Dbt not large enough for available data
key size: 55 ulen: 50
data size: 55 ulen: 50
+exception, iteration 4: Dbt not large enough for available data
+ key size: 69 ulen: 50
+ data size: 69 ulen: 50
+exception, iteration 7: Dbt not large enough for available data
+ key size: 65 ulen: 50
+ data size: 65 ulen: 50
=-=-=-= Test with DBT flags 32 bufsize 200
=-=-=-= Test with DBT flags 0 bufsize -1
diff --git a/db/test/scr016/TestDbtFlags.testout b/db/test/scr016/TestDbtFlags.testout
index 800eebe86..b8deb1bcc 100644
--- a/db/test/scr016/TestDbtFlags.testout
+++ b/db/test/scr016/TestDbtFlags.testout
@@ -1,48 +1,78 @@
=-=-=-= Test with DBT flags 4 bufsize -1
-FUN is never having to say you're SUSHI!! : !!IHSUS er'uoy yas ot gnivah reven si NUF
-Hold the MAYO & pass the COSMIC AWARENESS... : ...SSENERAWA CIMSOC eht ssap & OYAM eht dloH
-I pretend I'm living in a styrofoam packing crate, high in th'SWISS ALPS, still unable to accept th' idea of TOUCH-TONE DIALING!! : !!GNILAID ENOT-HCUOT fo aedi 'ht tpecca ot elbanu llits ,SPLA SSIWS'ht ni hgih ,etarc gnikcap maoforyts a ni gnivil m'I dneterp I
-I'm having a RELIGIOUS EXPERIENCE.. and I don't take any DRUGS : SGURD yna ekat t'nod I dna ..ECNEIREPXE SUOIGILER a gnivah m'I
-My nose feels like a bad Ronald Reagan movie... : ...eivom nagaeR dlanoR dab a ekil sleef eson yM
-The LOGARITHM of an ISOCELES TRIANGLE is TUESDAY WELD!! : !!DLEW YADSEUT si ELGNAIRT SELECOSI na fo MHTIRAGOL ehT
-What GOOD is a CARDBOARD suitcase ANYWAY? : ?YAWYNA esactius DRAOBDRAC a si DOOG tahW
+And this weak and idle theme : emeht eldi dna kaew siht dnA
+And, as I am an honest Puck, if we have unearned luck : kcul denraenu evah ew fi ,kcuP tsenoh na ma I sa ,dnA
+Else the Puck a liar call; so, good night unto you all. : .lla uoy otnu thgin doog ,os ;llac rail a kcuP eht eslE
+Gentles, do not reprehend : dneherper ton od ,seltneG
+Give me your hands, if we be friends, and Robin shall restore amends. : .sdnema erotser llahs niboR dna ,sdneirf eb ew fi ,sdnah ruoy em eviG
+If we shadows have offended : dedneffo evah swodahs ew fI
+No more yielding but a dream : maerd a tub gnidleiy erom oN
+Now to 'scape the serpent's tongue, we will make amends ere long; : ;gnol ere sdnema ekam lliw ew ,eugnot s'tnepres eht epacs' ot woN
+That you have but slumber'd here : ereh d'rebmuls tub evah uoy tahT
+Think but this, and all is mended : dednem si lla dna ,siht tub knihT
+While these visions did appear : raeppa did snoisiv eseht elihW
+if you pardon, we will mend : dnem lliw ew ,nodrap uoy fi
=-=-=-= Test with DBT flags 16 bufsize -1
-FUN is never having to say you're SUSHI!! : !!IHSUS er'uoy yas ot gnivah reven si NUF
-Hold the MAYO & pass the COSMIC AWARENESS... : ...SSENERAWA CIMSOC eht ssap & OYAM eht dloH
-I pretend I'm living in a styrofoam packing crate, high in th'SWISS ALPS, still unable to accept th' idea of TOUCH-TONE DIALING!! : !!GNILAID ENOT-HCUOT fo aedi 'ht tpecca ot elbanu llits ,SPLA SSIWS'ht ni hgih ,etarc gnikcap maoforyts a ni gnivil m'I dneterp I
-I'm having a RELIGIOUS EXPERIENCE.. and I don't take any DRUGS : SGURD yna ekat t'nod I dna ..ECNEIREPXE SUOIGILER a gnivah m'I
-My nose feels like a bad Ronald Reagan movie... : ...eivom nagaeR dlanoR dab a ekil sleef eson yM
-The LOGARITHM of an ISOCELES TRIANGLE is TUESDAY WELD!! : !!DLEW YADSEUT si ELGNAIRT SELECOSI na fo MHTIRAGOL ehT
-What GOOD is a CARDBOARD suitcase ANYWAY? : ?YAWYNA esactius DRAOBDRAC a si DOOG tahW
+And this weak and idle theme : emeht eldi dna kaew siht dnA
+And, as I am an honest Puck, if we have unearned luck : kcul denraenu evah ew fi ,kcuP tsenoh na ma I sa ,dnA
+Else the Puck a liar call; so, good night unto you all. : .lla uoy otnu thgin doog ,os ;llac rail a kcuP eht eslE
+Gentles, do not reprehend : dneherper ton od ,seltneG
+Give me your hands, if we be friends, and Robin shall restore amends. : .sdnema erotser llahs niboR dna ,sdneirf eb ew fi ,sdnah ruoy em eviG
+If we shadows have offended : dedneffo evah swodahs ew fI
+No more yielding but a dream : maerd a tub gnidleiy erom oN
+Now to 'scape the serpent's tongue, we will make amends ere long; : ;gnol ere sdnema ekam lliw ew ,eugnot s'tnepres eht epacs' ot woN
+That you have but slumber'd here : ereh d'rebmuls tub evah uoy tahT
+Think but this, and all is mended : dednem si lla dna ,siht tub knihT
+While these visions did appear : raeppa did snoisiv eseht elihW
+if you pardon, we will mend : dnem lliw ew ,nodrap uoy fi
=-=-=-= Test with DBT flags 32 bufsize 20
-FUN is never having to say you're SUSHI!! : !!IHSUS er'uoy yas ot gnivah reven si NUF
-Hold the MAYO & pass the COSMIC AWARENESS... : ...SSENERAWA CIMSOC eht ssap & OYAM eht dloH
-I pretend I'm living in a styrofoam packing crate, high in th'SWISS ALPS, still unable to accept th' idea of TOUCH-TONE DIALING!! : !!GNILAID ENOT-HCUOT fo aedi 'ht tpecca ot elbanu llits ,SPLA SSIWS'ht ni hgih ,etarc gnikcap maoforyts a ni gnivil m'I dneterp I
-I'm having a RELIGIOUS EXPERIENCE.. and I don't take any DRUGS : SGURD yna ekat t'nod I dna ..ECNEIREPXE SUOIGILER a gnivah m'I
-My nose feels like a bad Ronald Reagan movie... : ...eivom nagaeR dlanoR dab a ekil sleef eson yM
-The LOGARITHM of an ISOCELES TRIANGLE is TUESDAY WELD!! : !!DLEW YADSEUT si ELGNAIRT SELECOSI na fo MHTIRAGOL ehT
-What GOOD is a CARDBOARD suitcase ANYWAY? : ?YAWYNA esactius DRAOBDRAC a si DOOG tahW
+And this weak and idle theme : emeht eldi dna kaew siht dnA
+And, as I am an honest Puck, if we have unearned luck : kcul denraenu evah ew fi ,kcuP tsenoh na ma I sa ,dnA
+Else the Puck a liar call; so, good night unto you all. : .lla uoy otnu thgin doog ,os ;llac rail a kcuP eht eslE
+Gentles, do not reprehend : dneherper ton od ,seltneG
+Give me your hands, if we be friends, and Robin shall restore amends. : .sdnema erotser llahs niboR dna ,sdneirf eb ew fi ,sdnah ruoy em eviG
+If we shadows have offended : dedneffo evah swodahs ew fI
+No more yielding but a dream : maerd a tub gnidleiy erom oN
+Now to 'scape the serpent's tongue, we will make amends ere long; : ;gnol ere sdnema ekam lliw ew ,eugnot s'tnepres eht epacs' ot woN
+That you have but slumber'd here : ereh d'rebmuls tub evah uoy tahT
+Think but this, and all is mended : dednem si lla dna ,siht tub knihT
+While these visions did appear : raeppa did snoisiv eseht elihW
+if you pardon, we will mend : dnem lliw ew ,nodrap uoy fi
=-=-=-= Test with DBT flags 32 bufsize 50
-FUN is never having to say you're SUSHI!! : !!IHSUS er'uoy yas ot gnivah reven si NUF
-Hold the MAYO & pass the COSMIC AWARENESS... : ...SSENERAWA CIMSOC eht ssap & OYAM eht dloH
-I pretend I'm living in a styrofoam packing crate, high in th'SWISS ALPS, still unable to accept th' idea of TOUCH-TONE DIALING!! : !!GNILAID ENOT-HCUOT fo aedi 'ht tpecca ot elbanu llits ,SPLA SSIWS'ht ni hgih ,etarc gnikcap maoforyts a ni gnivil m'I dneterp I
-I'm having a RELIGIOUS EXPERIENCE.. and I don't take any DRUGS : SGURD yna ekat t'nod I dna ..ECNEIREPXE SUOIGILER a gnivah m'I
-My nose feels like a bad Ronald Reagan movie... : ...eivom nagaeR dlanoR dab a ekil sleef eson yM
-The LOGARITHM of an ISOCELES TRIANGLE is TUESDAY WELD!! : !!DLEW YADSEUT si ELGNAIRT SELECOSI na fo MHTIRAGOL ehT
-What GOOD is a CARDBOARD suitcase ANYWAY? : ?YAWYNA esactius DRAOBDRAC a si DOOG tahW
+And this weak and idle theme : emeht eldi dna kaew siht dnA
+And, as I am an honest Puck, if we have unearned luck : kcul denraenu evah ew fi ,kcuP tsenoh na ma I sa ,dnA
+Else the Puck a liar call; so, good night unto you all. : .lla uoy otnu thgin doog ,os ;llac rail a kcuP eht eslE
+Gentles, do not reprehend : dneherper ton od ,seltneG
+Give me your hands, if we be friends, and Robin shall restore amends. : .sdnema erotser llahs niboR dna ,sdneirf eb ew fi ,sdnah ruoy em eviG
+If we shadows have offended : dedneffo evah swodahs ew fI
+No more yielding but a dream : maerd a tub gnidleiy erom oN
+Now to 'scape the serpent's tongue, we will make amends ere long; : ;gnol ere sdnema ekam lliw ew ,eugnot s'tnepres eht epacs' ot woN
+That you have but slumber'd here : ereh d'rebmuls tub evah uoy tahT
+Think but this, and all is mended : dednem si lla dna ,siht tub knihT
+While these visions did appear : raeppa did snoisiv eseht elihW
+if you pardon, we will mend : dnem lliw ew ,nodrap uoy fi
=-=-=-= Test with DBT flags 32 bufsize 200
-FUN is never having to say you're SUSHI!! : !!IHSUS er'uoy yas ot gnivah reven si NUF
-Hold the MAYO & pass the COSMIC AWARENESS... : ...SSENERAWA CIMSOC eht ssap & OYAM eht dloH
-I pretend I'm living in a styrofoam packing crate, high in th'SWISS ALPS, still unable to accept th' idea of TOUCH-TONE DIALING!! : !!GNILAID ENOT-HCUOT fo aedi 'ht tpecca ot elbanu llits ,SPLA SSIWS'ht ni hgih ,etarc gnikcap maoforyts a ni gnivil m'I dneterp I
-I'm having a RELIGIOUS EXPERIENCE.. and I don't take any DRUGS : SGURD yna ekat t'nod I dna ..ECNEIREPXE SUOIGILER a gnivah m'I
-My nose feels like a bad Ronald Reagan movie... : ...eivom nagaeR dlanoR dab a ekil sleef eson yM
-The LOGARITHM of an ISOCELES TRIANGLE is TUESDAY WELD!! : !!DLEW YADSEUT si ELGNAIRT SELECOSI na fo MHTIRAGOL ehT
-What GOOD is a CARDBOARD suitcase ANYWAY? : ?YAWYNA esactius DRAOBDRAC a si DOOG tahW
+And this weak and idle theme : emeht eldi dna kaew siht dnA
+And, as I am an honest Puck, if we have unearned luck : kcul denraenu evah ew fi ,kcuP tsenoh na ma I sa ,dnA
+Else the Puck a liar call; so, good night unto you all. : .lla uoy otnu thgin doog ,os ;llac rail a kcuP eht eslE
+Gentles, do not reprehend : dneherper ton od ,seltneG
+Give me your hands, if we be friends, and Robin shall restore amends. : .sdnema erotser llahs niboR dna ,sdneirf eb ew fi ,sdnah ruoy em eviG
+If we shadows have offended : dedneffo evah swodahs ew fI
+No more yielding but a dream : maerd a tub gnidleiy erom oN
+Now to 'scape the serpent's tongue, we will make amends ere long; : ;gnol ere sdnema ekam lliw ew ,eugnot s'tnepres eht epacs' ot woN
+That you have but slumber'd here : ereh d'rebmuls tub evah uoy tahT
+Think but this, and all is mended : dednem si lla dna ,siht tub knihT
+While these visions did appear : raeppa did snoisiv eseht elihW
+if you pardon, we will mend : dnem lliw ew ,nodrap uoy fi
=-=-=-= Test with DBT flags 0 bufsize -1
-FUN is never having to say you're SUSHI!! : !!IHSUS er'uoy yas ot gnivah reven si NUF
-Hold the MAYO & pass the COSMIC AWARENESS... : ...SSENERAWA CIMSOC eht ssap & OYAM eht dloH
-I pretend I'm living in a styrofoam packing crate, high in th'SWISS ALPS, still unable to accept th' idea of TOUCH-TONE DIALING!! : !!GNILAID ENOT-HCUOT fo aedi 'ht tpecca ot elbanu llits ,SPLA SSIWS'ht ni hgih ,etarc gnikcap maoforyts a ni gnivil m'I dneterp I
-I'm having a RELIGIOUS EXPERIENCE.. and I don't take any DRUGS : SGURD yna ekat t'nod I dna ..ECNEIREPXE SUOIGILER a gnivah m'I
-My nose feels like a bad Ronald Reagan movie... : ...eivom nagaeR dlanoR dab a ekil sleef eson yM
-The LOGARITHM of an ISOCELES TRIANGLE is TUESDAY WELD!! : !!DLEW YADSEUT si ELGNAIRT SELECOSI na fo MHTIRAGOL ehT
-What GOOD is a CARDBOARD suitcase ANYWAY? : ?YAWYNA esactius DRAOBDRAC a si DOOG tahW
+And this weak and idle theme : emeht eldi dna kaew siht dnA
+And, as I am an honest Puck, if we have unearned luck : kcul denraenu evah ew fi ,kcuP tsenoh na ma I sa ,dnA
+Else the Puck a liar call; so, good night unto you all. : .lla uoy otnu thgin doog ,os ;llac rail a kcuP eht eslE
+Gentles, do not reprehend : dneherper ton od ,seltneG
+Give me your hands, if we be friends, and Robin shall restore amends. : .sdnema erotser llahs niboR dna ,sdneirf eb ew fi ,sdnah ruoy em eviG
+If we shadows have offended : dedneffo evah swodahs ew fI
+No more yielding but a dream : maerd a tub gnidleiy erom oN
+Now to 'scape the serpent's tongue, we will make amends ere long; : ;gnol ere sdnema ekam lliw ew ,eugnot s'tnepres eht epacs' ot woN
+That you have but slumber'd here : ereh d'rebmuls tub evah uoy tahT
+Think but this, and all is mended : dednem si lla dna ,siht tub knihT
+While these visions did appear : raeppa did snoisiv eseht elihW
+if you pardon, we will mend : dnem lliw ew ,nodrap uoy fi
diff --git a/db/test/scr016/TestKeyRange.java b/db/test/scr016/TestKeyRange.java
index 83cba1365..330663146 100644
--- a/db/test/scr016/TestKeyRange.java
+++ b/db/test/scr016/TestKeyRange.java
@@ -7,7 +7,7 @@
* Copyright (c) 1997-2002
* Sleepycat Software. All rights reserved.
*
- * Id: TestKeyRange.java,v 1.3 2002/01/11 15:54:02 bostic Exp
+ * Id: TestKeyRange.java,v 1.4 2002/08/16 19:35:55 dda Exp
*/
package com.sleepycat.test;
@@ -105,7 +105,7 @@ public class TestKeyRange
Db table = new Db(null, 0);
table.set_error_stream(System.err);
table.set_errpfx("TestKeyRange");
- table.open(FileName, null, Db.DB_BTREE, Db.DB_CREATE, 0644);
+ table.open(null, FileName, null, Db.DB_BTREE, Db.DB_CREATE, 0644);
//
// Insert records into the database, where the key is the user
diff --git a/db/test/scr016/TestLockVec.java b/db/test/scr016/TestLockVec.java
index c0e82b175..06024e4ed 100644
--- a/db/test/scr016/TestLockVec.java
+++ b/db/test/scr016/TestLockVec.java
@@ -4,7 +4,7 @@
* Copyright (c) 1997-2002
* Sleepycat Software. All rights reserved.
*
- * Id: TestLockVec.java,v 1.3 2002/01/11 15:54:02 bostic Exp
+ * Id: TestLockVec.java,v 1.4 2002/08/16 19:35:55 dda Exp
*/
/*
@@ -43,9 +43,9 @@ public class TestLockVec
locker1 = dbenv1.lock_id();
locker2 = dbenv1.lock_id();
Db db1 = new Db(dbenv1, 0);
- db1.open("my.db", null, Db.DB_BTREE, Db.DB_CREATE, 0);
+ db1.open(null, "my.db", null, Db.DB_BTREE, Db.DB_CREATE, 0);
Db db2 = new Db(dbenv2, 0);
- db2.open("my.db", null, Db.DB_BTREE, 0, 0);
+ db2.open(null, "my.db", null, Db.DB_BTREE, 0, 0);
// populate our database, just two elements.
Dbt Akey = new Dbt("A".getBytes());
diff --git a/db/test/scr016/TestLogc.java b/db/test/scr016/TestLogc.java
index 628abb036..afd870917 100644
--- a/db/test/scr016/TestLogc.java
+++ b/db/test/scr016/TestLogc.java
@@ -4,7 +4,7 @@
* Copyright (c) 1997-2002
* Sleepycat Software. All rights reserved.
*
- * Id: TestLogc.java,v 1.6 2002/01/11 15:54:03 bostic Exp
+ * Id: TestLogc.java,v 1.7 2002/08/16 19:35:55 dda Exp
*/
/*
@@ -26,13 +26,13 @@ public class TestLogc
// Do some database activity to get something into the log.
Db db1 = new Db(env, 0);
- db1.open("first.db", null, Db.DB_BTREE, Db.DB_CREATE, 0);
+ db1.open(null, "first.db", null, Db.DB_BTREE, Db.DB_CREATE, 0);
db1.put(null, new Dbt("a".getBytes()), new Dbt("b".getBytes()), 0);
db1.put(null, new Dbt("c".getBytes()), new Dbt("d".getBytes()), 0);
db1.close(0);
Db db2 = new Db(env, 0);
- db2.open("second.db", null, Db.DB_BTREE, Db.DB_CREATE, 0644);
+ db2.open(null, "second.db", null, Db.DB_BTREE, Db.DB_CREATE, 0644);
db2.put(null, new Dbt("w".getBytes()), new Dbt("x".getBytes()), 0);
db2.put(null, new Dbt("y".getBytes()), new Dbt("z".getBytes()), 0);
db2.close(0);
diff --git a/db/test/scr016/TestOpenEmpty.java b/db/test/scr016/TestOpenEmpty.java
index 51de512f0..14b2368d7 100644
--- a/db/test/scr016/TestOpenEmpty.java
+++ b/db/test/scr016/TestOpenEmpty.java
@@ -4,7 +4,7 @@
* Copyright (c) 1997-2002
* Sleepycat Software. All rights reserved.
*
- * Id: TestOpenEmpty.java,v 1.3 2002/01/11 15:54:03 bostic Exp
+ * Id: TestOpenEmpty.java,v 1.4 2002/08/16 19:35:55 dda Exp
*/
package com.sleepycat.test;
@@ -104,7 +104,7 @@ public class TestOpenEmpty
Db table = new Db(null, 0);
table.set_error_stream(System.err);
table.set_errpfx("TestOpenEmpty");
- table.open(FileName, null, Db.DB_BTREE, Db.DB_CREATE, 0644);
+ table.open(null, FileName, null, Db.DB_BTREE, Db.DB_CREATE, 0644);
//
// Insert records into the database, where the key is the user
diff --git a/db/test/scr016/TestSimpleAccess.java b/db/test/scr016/TestSimpleAccess.java
index 4a3c6898e..6bc82e9d7 100644
--- a/db/test/scr016/TestSimpleAccess.java
+++ b/db/test/scr016/TestSimpleAccess.java
@@ -4,7 +4,7 @@
* Copyright (c) 1997-2002
* Sleepycat Software. All rights reserved.
*
- * Id: TestSimpleAccess.java,v 1.4 2002/01/23 14:29:52 bostic Exp
+ * Id: TestSimpleAccess.java,v 1.5 2002/08/16 19:35:55 dda Exp
*/
/*
@@ -24,38 +24,7 @@ public class TestSimpleAccess
Db db = new Db(null, 0);
db.open(null, "my.db", null, Db.DB_BTREE, Db.DB_CREATE, 0644);
- // populate our massive database.
- Dbt keydbt = new Dbt("key".getBytes());
- Dbt datadbt = new Dbt("data".getBytes());
- db.put(null, keydbt, datadbt, 0);
-
- // Now, retrieve. We could use keydbt over again,
- // but that wouldn't be typical in an application.
- Dbt goodkeydbt = new Dbt("key".getBytes());
- Dbt badkeydbt = new Dbt("badkey".getBytes());
- Dbt resultdbt = new Dbt();
- resultdbt.set_flags(Db.DB_DBT_MALLOC);
-
- int ret;
-
- if ((ret = db.get(null, goodkeydbt, resultdbt, 0)) != 0) {
- System.out.println("get: " + DbEnv.strerror(ret));
- }
- else {
- String result =
- new String(resultdbt.get_data(), 0, resultdbt.get_size());
- System.out.println("got data: " + result);
- }
-
- if ((ret = db.get(null, badkeydbt, resultdbt, 0)) != 0) {
- // We expect this...
- System.out.println("get using bad key: " + DbEnv.strerror(ret));
- }
- else {
- String result =
- new String(resultdbt.get_data(), 0, resultdbt.get_size());
- System.out.println("*** got data using bad key!!: " + result);
- }
+ TestUtil.populate(db);
System.out.println("finished test");
}
catch (DbException dbe) {
@@ -64,7 +33,5 @@ public class TestSimpleAccess
catch (FileNotFoundException fnfe) {
System.err.println("FileNotFoundException: " + fnfe);
}
-
}
-
}
diff --git a/db/test/scr016/chk.javatests b/db/test/scr016/chk.javatests
index 51b55f8fd..9319de703 100644
--- a/db/test/scr016/chk.javatests
+++ b/db/test/scr016/chk.javatests
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# Id: chk.javatests,v 1.4 2002/03/27 04:33:08 bostic Exp
+# Id: chk.javatests,v 1.5 2002/08/16 19:35:56 dda Exp
#
# Check to make sure that regression tests for Java run.
@@ -51,7 +51,8 @@ for testname in $testnames; do
rm -rf TESTJAVA; mkdir -p TESTJAVA/classes
cd ./TESTJAVA
testprefix=../$TEST_JAVA_SRCDIR/$testname
- ${JAVAC} -d ./classes $testprefix.java > ../$testname.compileout 2>&1 || {
+ ${JAVAC} -d ./classes $testprefix.java ../$TEST_JAVA_SRCDIR/TestUtil.java > ../$testname.compileout 2>&1 || {
+pwd
echo "FAIL: compilation of $testname failed, see ../$testname.compileout"
exit 1
}
diff --git a/db/test/scr016/ignore b/db/test/scr016/ignore
index ced56a904..5282f4180 100644
--- a/db/test/scr016/ignore
+++ b/db/test/scr016/ignore
@@ -1,5 +1,5 @@
#
-# Id: ignore,v 1.3 2001/10/12 13:02:34 dda Exp
+# Id: ignore,v 1.4 2002/08/16 19:35:56 dda Exp
#
# A list of tests to ignore
@@ -9,3 +9,14 @@ TestRpcServer
# TestReplication is not debugged
TestReplication
+# These are currently not working
+TestAppendRecno
+TestAssociate
+TestLogc
+TestConstruct02
+
+# TestUtil is used by the other tests, it does not stand on its own
+TestUtil
+
+# XA needs a special installation, it is not part of testall
+TestXAServlet
diff --git a/db/test/scr016/testone b/db/test/scr016/testone
index 502027062..1937b4404 100644
--- a/db/test/scr016/testone
+++ b/db/test/scr016/testone
@@ -1,5 +1,5 @@
#!/bin/sh -
-# Id: testone,v 1.4 2001/09/20 14:40:29 dda Exp
+# Id: testone,v 1.5 2002/08/16 19:35:56 dda Exp
#
# Run just one Java regression test, the single argument
# is the classname within this package.
@@ -83,7 +83,7 @@ fi
rm -rf TESTDIR; mkdir TESTDIR
cd ./TESTDIR
mkdir -p $classdir
-${JAVAC} -d $classdir ../$name.java > ../$name.compileout 2>&1
+${JAVAC} -d $classdir ../$name.java ../TestUtil.java > ../$name.compileout 2>&1
if [ $? != 0 -o -s ../$name.compileout ]; then
error "compilation of $name failed, see $name.compileout"
exit 1
@@ -100,9 +100,9 @@ fi
rm -rf TESTDIR
if [ "$stdinflag" = y ]
then
- ${JAVA} com.sleepycat.test.$name >../$name.out 2>../$name.err
+ ${JAVA} com.sleepycat.test.$name $TEST_ARGS >../$name.out 2>../$name.err
else
- ${JAVA} com.sleepycat.test.$name <$infile >../$name.out 2>../$name.err
+ ${JAVA} com.sleepycat.test.$name $TEST_ARGS <$infile >../$name.out 2>../$name.err
fi
cd ..
diff --git a/db/test/test096.tcl b/db/test/test096.tcl
index 84bd6dd35..ddbfd6f78 100644
--- a/db/test/test096.tcl
+++ b/db/test/test096.tcl
@@ -3,7 +3,7 @@
# Copyright (c) 1999-2002
# Sleepycat Software. All rights reserved.
#
-# Id: test096.tcl,v 11.18 2002/07/22 16:53:00 sue Exp
+# Id: test096.tcl,v 11.19 2002/08/19 20:09:29 margo Exp
#
# TEST test096
# TEST Db->truncate test.
@@ -107,7 +107,7 @@ proc test096 { method {pagesize 512} {nentries 50} {ndups 4} args} {
# Remove database, and create a new one with dups.
#
puts "\tTest096.d: Create $nentries entries with $ndups duplicates"
- set ret [berkdb dbremove -env $env $testfile]
+ set ret [berkdb dbremove -env $env -auto_commit $testfile]
set db [eval {berkdb_open -pagesize $pagesize -dup -auto_commit \
-create -env $env $omethod -mode 0644} $args $testfile]
error_check_good db_open [is_valid_db $db] TRUE