Commit 38967db1 authored by Barry Perlman's avatar Barry Perlman Committed by Yoni Fogel

[t:3028] Do not disable engine status on failed assert for BDB tests.

git-svn-id: file:///svn/toku/tokudb@25878 c7de825b-a66e-492c-adef-691d508d4ae1
parent 8f7edd2c
...@@ -15,7 +15,9 @@ static void run_test (void) { ...@@ -15,7 +15,9 @@ static void run_test (void) {
DB_ENV *env; DB_ENV *env;
r = db_env_create(&env, 0); CKERR(r); r = db_env_create(&env, 0); CKERR(r);
#if IS_TDB
db_env_enable_engine_status(0); // disable engine status on crash because test is expected to fail db_env_enable_engine_status(0); // disable engine status on crash because test is expected to fail
#endif
r = env->open(env, ENVDIR, envflags, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r); r = env->open(env, ENVDIR, envflags, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r);
DB *db; DB *db;
...@@ -31,7 +33,9 @@ static void run_recover (void) { ...@@ -31,7 +33,9 @@ static void run_recover (void) {
// run recovery // run recovery
r = db_env_create(&env, 0); CKERR(r); r = db_env_create(&env, 0); CKERR(r);
#if IS_TDB
db_env_enable_engine_status(0); // disable engine status on crash because test is expected to fail db_env_enable_engine_status(0); // disable engine status on crash because test is expected to fail
#endif
r = env->open(env, ENVDIR, envflags + DB_RECOVER, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r); r = env->open(env, ENVDIR, envflags + DB_RECOVER, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r);
r = env->close(env, 0); CKERR(r); r = env->close(env, 0); CKERR(r);
exit(0); exit(0);
...@@ -42,7 +46,9 @@ static void run_no_recover (void) { ...@@ -42,7 +46,9 @@ static void run_no_recover (void) {
int r; int r;
r = db_env_create(&env, 0); CKERR(r); r = db_env_create(&env, 0); CKERR(r);
#if IS_TDB
db_env_enable_engine_status(0); // disable engine status on crash because test is expected to fail db_env_enable_engine_status(0); // disable engine status on crash because test is expected to fail
#endif
r = env->open(env, ENVDIR, envflags & ~DB_RECOVER, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r); r = env->open(env, ENVDIR, envflags & ~DB_RECOVER, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r);
r = env->close(env, 0); CKERR(r); r = env->close(env, 0); CKERR(r);
exit(0); exit(0);
......
...@@ -25,7 +25,9 @@ static void run_test (void) { ...@@ -25,7 +25,9 @@ static void run_test (void) {
DB_ENV *env; DB_ENV *env;
r = db_env_create(&env, 0); CKERR(r); r = db_env_create(&env, 0); CKERR(r);
#if IS_TDB
db_env_enable_engine_status(0); // disable engine status on crash because test is expected to fail db_env_enable_engine_status(0); // disable engine status on crash because test is expected to fail
#endif
r = env->open(env, ENVDIR, envflags, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r); r = env->open(env, ENVDIR, envflags, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r);
DB *dba; DB *dba;
...@@ -69,7 +71,9 @@ static void run_recover (void) { ...@@ -69,7 +71,9 @@ static void run_recover (void) {
CKERR(r); CKERR(r);
r = db_env_create(&env, 0); CKERR(r); r = db_env_create(&env, 0); CKERR(r);
#if IS_TDB
db_env_enable_engine_status(0); // disable engine status on crash because test is expected to fail db_env_enable_engine_status(0); // disable engine status on crash because test is expected to fail
#endif
r = env->open(env, ENVDIR, envflags + DB_RECOVER, S_IRWXU+S_IRWXG+S_IRWXO); r = env->open(env, ENVDIR, envflags + DB_RECOVER, S_IRWXU+S_IRWXG+S_IRWXO);
assert(r == DB_RUNRECOVERY); assert(r == DB_RUNRECOVERY);
...@@ -89,7 +93,9 @@ static void run_no_recover (void) { ...@@ -89,7 +93,9 @@ static void run_no_recover (void) {
int r; int r;
r = db_env_create(&env, 0); CKERR(r); r = db_env_create(&env, 0); CKERR(r);
#if IS_TDB
db_env_enable_engine_status(0); // disable engine status on crash because test is expected to fail db_env_enable_engine_status(0); // disable engine status on crash because test is expected to fail
#endif
r = env->open(env, ENVDIR, envflags & ~DB_RECOVER, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r); r = env->open(env, ENVDIR, envflags & ~DB_RECOVER, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r);
r = env->close(env, 0); CKERR(r); r = env->close(env, 0); CKERR(r);
exit(0); exit(0);
......
...@@ -25,7 +25,9 @@ static void run_test (void) { ...@@ -25,7 +25,9 @@ static void run_test (void) {
DB *dba; DB *dba;
r = db_env_create(&env, 0); CKERR(r); r = db_env_create(&env, 0); CKERR(r);
#if IS_TDB
db_env_enable_engine_status(0); // disable engine status on crash because test is expected to fail db_env_enable_engine_status(0); // disable engine status on crash because test is expected to fail
#endif
r = env->open(env, ENVDIR, envflags, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r); r = env->open(env, ENVDIR, envflags, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r);
r = db_create(&dba, env, 0); CKERR(r); r = db_create(&dba, env, 0); CKERR(r);
...@@ -59,7 +61,9 @@ static void run_recover (void) { ...@@ -59,7 +61,9 @@ static void run_recover (void) {
CKERR(r); CKERR(r);
r = db_env_create(&env, 0); CKERR(r); r = db_env_create(&env, 0); CKERR(r);
#if IS_TDB
db_env_enable_engine_status(0); // disable engine status on crash because test is expected to fail db_env_enable_engine_status(0); // disable engine status on crash because test is expected to fail
#endif
r = env->open(env, ENVDIR, envflags + DB_RECOVER, S_IRWXU+S_IRWXG+S_IRWXO); r = env->open(env, ENVDIR, envflags + DB_RECOVER, S_IRWXU+S_IRWXG+S_IRWXO);
CKERR2(r, DB_RUNRECOVERY); CKERR2(r, DB_RUNRECOVERY);
...@@ -79,7 +83,9 @@ static void run_no_recover (void) { ...@@ -79,7 +83,9 @@ static void run_no_recover (void) {
int r; int r;
r = db_env_create(&env, 0); CKERR(r); r = db_env_create(&env, 0); CKERR(r);
#if IS_TDB
db_env_enable_engine_status(0); // disable engine status on crash because test is expected to fail db_env_enable_engine_status(0); // disable engine status on crash because test is expected to fail
#endif
r = env->open(env, ENVDIR, envflags & ~DB_RECOVER, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r); r = env->open(env, ENVDIR, envflags & ~DB_RECOVER, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r);
r = env->close(env, 0); CKERR(r); r = env->close(env, 0); CKERR(r);
exit(0); exit(0);
......
...@@ -33,7 +33,9 @@ static void insert_some (int outeri, BOOL close_env) { ...@@ -33,7 +33,9 @@ static void insert_some (int outeri, BOOL close_env) {
DB *db; DB *db;
DB_TXN *tid; DB_TXN *tid;
r=db_env_create(&env, 0); assert(r==0); r=db_env_create(&env, 0); assert(r==0);
#if IS_TDB
db_env_enable_engine_status(0); // disable engine status on crash because test is expected to fail db_env_enable_engine_status(0); // disable engine status on crash because test is expected to fail
#endif
r=env->set_lk_max_locks(env, 2*maxcount); CKERR(r); r=env->set_lk_max_locks(env, 2*maxcount); CKERR(r);
r=env->open(env, ENVDIR, DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_MPOOL|DB_INIT_TXN|DB_CREATE|DB_PRIVATE|create_flag, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r); r=env->open(env, ENVDIR, DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_MPOOL|DB_INIT_TXN|DB_CREATE|DB_PRIVATE|create_flag, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r);
r=db_create(&db, env, 0); CKERR(r); r=db_create(&db, env, 0); CKERR(r);
...@@ -85,7 +87,9 @@ static void make_db (BOOL close_env) { ...@@ -85,7 +87,9 @@ static void make_db (BOOL close_env) {
CKERR(r); CKERR(r);
r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); assert(r==0); r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); assert(r==0);
r=db_env_create(&env, 0); assert(r==0); r=db_env_create(&env, 0); assert(r==0);
#if IS_TDB
db_env_enable_engine_status(0); // disable engine status on crash because test is expected to fail db_env_enable_engine_status(0); // disable engine status on crash because test is expected to fail
#endif
r=env->set_lk_max_locks(env, 2*maxcount); CKERR(r); r=env->set_lk_max_locks(env, 2*maxcount); CKERR(r);
r=env->open(env, ENVDIR, DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_MPOOL|DB_INIT_TXN|DB_CREATE|DB_PRIVATE, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r); r=env->open(env, ENVDIR, DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_MPOOL|DB_INIT_TXN|DB_CREATE|DB_PRIVATE, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r);
r=db_create(&db, env, 0); CKERR(r); r=db_create(&db, env, 0); CKERR(r);
......
...@@ -32,7 +32,9 @@ static void insert_some (int outeri, BOOL close_env) { ...@@ -32,7 +32,9 @@ static void insert_some (int outeri, BOOL close_env) {
DB *db; DB *db;
DB_TXN *tid; DB_TXN *tid;
r=db_env_create(&env, 0); assert(r==0); r=db_env_create(&env, 0); assert(r==0);
#if IS_TDB
db_env_enable_engine_status(0); // disable engine status on crash because test is expected to fail db_env_enable_engine_status(0); // disable engine status on crash because test is expected to fail
#endif
r=env->set_lk_max_locks(env, 2*maxcount); CKERR(r); r=env->set_lk_max_locks(env, 2*maxcount); CKERR(r);
r=env->open(env, ENVDIR, DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_MPOOL|DB_INIT_TXN|DB_CREATE|DB_PRIVATE|create_flag, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r); r=env->open(env, ENVDIR, DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_MPOOL|DB_INIT_TXN|DB_CREATE|DB_PRIVATE|create_flag, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r);
...@@ -78,7 +80,9 @@ static void make_db (BOOL close_env) { ...@@ -78,7 +80,9 @@ static void make_db (BOOL close_env) {
CKERR(r); CKERR(r);
r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); assert(r==0); r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); assert(r==0);
r=db_env_create(&env, 0); assert(r==0); r=db_env_create(&env, 0); assert(r==0);
#if IS_TDB
db_env_enable_engine_status(0); // disable engine status on crash because test is expected to fail db_env_enable_engine_status(0); // disable engine status on crash because test is expected to fail
#endif
r=env->set_lk_max_locks(env, 2*maxcount); CKERR(r); r=env->set_lk_max_locks(env, 2*maxcount); CKERR(r);
r=env->open(env, ENVDIR, DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_MPOOL|DB_INIT_TXN|DB_CREATE|DB_PRIVATE, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r); r=env->open(env, ENVDIR, DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_MPOOL|DB_INIT_TXN|DB_CREATE|DB_PRIVATE, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r);
r=db_create(&db, env, 0); CKERR(r); r=db_create(&db, env, 0); CKERR(r);
......
...@@ -32,7 +32,9 @@ static void insert_some (int outeri, BOOL close_env) { ...@@ -32,7 +32,9 @@ static void insert_some (int outeri, BOOL close_env) {
DB *db; DB *db;
DB_TXN *tid; DB_TXN *tid;
r=db_env_create(&env, 0); assert(r==0); r=db_env_create(&env, 0); assert(r==0);
#if IS_TDB
db_env_enable_engine_status(0); // disable engine status on crash because test is expected to fail db_env_enable_engine_status(0); // disable engine status on crash because test is expected to fail
#endif
r=env->set_lk_max_locks(env, 2*maxcount); CKERR(r); r=env->set_lk_max_locks(env, 2*maxcount); CKERR(r);
r=env->open(env, ENVDIR, DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_MPOOL|DB_INIT_TXN|DB_CREATE|DB_PRIVATE|create_flag, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r); r=env->open(env, ENVDIR, DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_MPOOL|DB_INIT_TXN|DB_CREATE|DB_PRIVATE|create_flag, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r);
r=db_create(&db, env, 0); CKERR(r); r=db_create(&db, env, 0); CKERR(r);
...@@ -77,7 +79,9 @@ static void make_db (BOOL close_env) { ...@@ -77,7 +79,9 @@ static void make_db (BOOL close_env) {
CKERR(r); CKERR(r);
r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); assert(r==0); r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); assert(r==0);
r=db_env_create(&env, 0); assert(r==0); r=db_env_create(&env, 0); assert(r==0);
#if IS_TDB
db_env_enable_engine_status(0); // disable engine status on crash because test is expected to fail db_env_enable_engine_status(0); // disable engine status on crash because test is expected to fail
#endif
r=env->set_lk_max_locks(env, 2*maxcount); CKERR(r); r=env->set_lk_max_locks(env, 2*maxcount); CKERR(r);
r=env->open(env, ENVDIR, DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_MPOOL|DB_INIT_TXN|DB_CREATE|DB_PRIVATE, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r); r=env->open(env, ENVDIR, DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_MPOOL|DB_INIT_TXN|DB_CREATE|DB_PRIVATE, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r);
r=db_create(&db, env, 0); CKERR(r); r=db_create(&db, env, 0); CKERR(r);
......
...@@ -20,7 +20,9 @@ test_truncate_txn_abort (int n) { ...@@ -20,7 +20,9 @@ test_truncate_txn_abort (int n) {
DBC *cursor; DBC *cursor;
r = db_env_create(&env, 0); assert(r == 0); r = db_env_create(&env, 0); assert(r == 0);
#if IS_TDB
db_env_enable_engine_status(0); // disable engine status on crash because test is expected to fail db_env_enable_engine_status(0); // disable engine status on crash because test is expected to fail
#endif
r = env->open(env, ENVDIR, DB_INIT_MPOOL + DB_INIT_LOCK + DB_INIT_TXN + DB_PRIVATE + DB_CREATE, S_IRWXU+S_IRWXG+S_IRWXO); assert(r == 0); r = env->open(env, ENVDIR, DB_INIT_MPOOL + DB_INIT_LOCK + DB_INIT_TXN + DB_PRIVATE + DB_CREATE, S_IRWXU+S_IRWXG+S_IRWXO); assert(r == 0);
int i; int i;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment