Commit de32b9dc authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

remove linux only code from some recover tests [t:1864]

git-svn-id: file:///svn/toku/tokudb@14639 c7de825b-a66e-492c-adef-691d508d4ae1
parent 9f75c8f4
// test data directories // test data directories
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/wait.h>
#include "test.h" #include "test.h"
const int envflags = DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN; const int envflags = DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN;
......
// fcreate, fdelete, fcreate after a checkpoint // fcreate, fdelete, fcreate after a checkpoint
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/wait.h>
#include "test.h" #include "test.h"
const int envflags = DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN; const int envflags = DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN;
......
// this test makes sure that fassociate can open nodup and dupsort dictionaries // this test makes sure that fassociate can open nodup and dupsort dictionaries
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/wait.h>
#include "test.h" #include "test.h"
const int envflags = DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN; const int envflags = DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN;
......
// this test makes sure that fassociate can open nodup and dupsort dictionaries // this test makes sure that fassociate can open nodup and dupsort dictionaries
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/wait.h>
#include "test.h" #include "test.h"
const int envflags = DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN; const int envflags = DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN;
......
// verify thtat we can create the correct tree type after the db is removed // verify thtat we can create the correct tree type after the db is removed
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/wait.h>
#include "test.h" #include "test.h"
const int envflags = DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN; const int envflags = DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN;
......
// verify that we can fcreate after fdelete with different treeflags // verify that we can fcreate after fdelete with different treeflags
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/wait.h>
#include "test.h" #include "test.h"
const int envflags = DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN; const int envflags = DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN;
......
// this test makes sure the LSN filtering is used during recovery // this test makes sure the LSN filtering is used during recovery
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/wait.h>
#include "test.h" #include "test.h"
const int envflags = DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN; const int envflags = DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN;
......
// verify that DB_RUNRECOVERY is returned when there is a missing logfile // verify that DB_RUNRECOVERY is returned when there is a missing logfile
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/wait.h>
#include "test.h" #include "test.h"
const int envflags = DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN; const int envflags = DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN;
......
// TODO // TODO
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/wait.h>
#include "test.h" #include "test.h"
const int envflags = DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN; const int envflags = DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN;
......
// TODO // nested txn straddles the recovery turn around point in the log
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/wait.h>
#include "test.h" #include "test.h"
const int envflags = DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN; const int envflags = DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN;
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
* check to see if both A and B are present (or absent) * check to see if both A and B are present (or absent)
*/ */
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/wait.h>
#include "test.h" #include "test.h"
const int envflags = DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN; const int envflags = DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN;
...@@ -134,6 +133,7 @@ do_x1_no_recover (void) { ...@@ -134,6 +133,7 @@ do_x1_no_recover (void) {
const char *cmd; const char *cmd;
#if 0
static void static void
do_test_internal (BOOL commit) do_test_internal (BOOL commit)
{ {
...@@ -173,6 +173,7 @@ do_test (void) { ...@@ -173,6 +173,7 @@ do_test (void) {
do_test_internal(TRUE); do_test_internal(TRUE);
do_test_internal(FALSE); do_test_internal(FALSE);
} }
#endif
BOOL do_commit=FALSE, do_abort=FALSE, do_explicit_abort=FALSE, do_recover_committed=FALSE, do_recover_aborted=FALSE, do_recover_only=FALSE, do_no_recover = FALSE; BOOL do_commit=FALSE, do_abort=FALSE, do_explicit_abort=FALSE, do_recover_committed=FALSE, do_recover_aborted=FALSE, do_recover_only=FALSE, do_no_recover = FALSE;
...@@ -249,8 +250,11 @@ test_main (int argc, char *argv[]) ...@@ -249,8 +250,11 @@ test_main (int argc, char *argv[])
do_x1_recover_only(); do_x1_recover_only();
} else if (do_no_recover) { } else if (do_no_recover) {
do_x1_no_recover(); do_x1_no_recover();
} else { }
#if 0
else {
do_test(); do_test();
} }
#endif
return 0; return 0;
} }
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
* check to see if both A and B are present (or absent) * check to see if both A and B are present (or absent)
*/ */
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/wait.h>
#include "test.h" #include "test.h"
const int envflags = DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN; const int envflags = DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN;
...@@ -134,6 +133,8 @@ do_x1_no_recover (void) { ...@@ -134,6 +133,8 @@ do_x1_no_recover (void) {
const char *cmd; const char *cmd;
#if 0
static void static void
do_test_internal (BOOL commit) do_test_internal (BOOL commit)
{ {
...@@ -174,6 +175,9 @@ do_test (void) { ...@@ -174,6 +175,9 @@ do_test (void) {
do_test_internal(FALSE); do_test_internal(FALSE);
} }
#endif
BOOL do_commit=FALSE, do_abort=FALSE, do_explicit_abort=FALSE, do_recover_committed=FALSE, do_recover_aborted=FALSE, do_recover_only=FALSE, do_no_recover = FALSE; BOOL do_commit=FALSE, do_abort=FALSE, do_explicit_abort=FALSE, do_recover_committed=FALSE, do_recover_aborted=FALSE, do_recover_only=FALSE, do_no_recover = FALSE;
static void static void
...@@ -249,8 +253,11 @@ test_main (int argc, char *argv[]) ...@@ -249,8 +253,11 @@ test_main (int argc, char *argv[])
do_x1_recover_only(); do_x1_recover_only();
} else if (do_no_recover) { } else if (do_no_recover) {
do_x1_no_recover(); do_x1_no_recover();
} else { }
#if 0
else {
do_test(); do_test();
} }
#endif
return 0; return 0;
} }
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
* check to see if both A and B are present (or absent) * check to see if both A and B are present (or absent)
*/ */
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/wait.h>
#include "test.h" #include "test.h"
const int envflags = DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN; const int envflags = DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN;
...@@ -125,6 +124,8 @@ do_x1_recover_only (void) { ...@@ -125,6 +124,8 @@ do_x1_recover_only (void) {
const char *cmd; const char *cmd;
#if 0
static void static void
do_test_internal (BOOL commit) { do_test_internal (BOOL commit) {
pid_t pid; pid_t pid;
...@@ -164,6 +165,8 @@ do_test (void) { ...@@ -164,6 +165,8 @@ do_test (void) {
do_test_internal(FALSE); do_test_internal(FALSE);
} }
#endif
BOOL do_commit=FALSE, do_abort=FALSE, do_explicit_abort=FALSE, do_recover_committed=FALSE, do_recover_aborted=FALSE, do_recover_only=FALSE; BOOL do_commit=FALSE, do_abort=FALSE, do_explicit_abort=FALSE, do_recover_committed=FALSE, do_recover_aborted=FALSE, do_recover_only=FALSE;
static void static void
...@@ -233,8 +236,11 @@ test_main (int argc, char *argv[]) { ...@@ -233,8 +236,11 @@ test_main (int argc, char *argv[]) {
do_x1_recover(FALSE); do_x1_recover(FALSE);
} else if (do_recover_only) { } else if (do_recover_only) {
do_x1_recover_only(); do_x1_recover_only();
} else { }
#if 0
else {
do_test(); do_test();
} }
#endif
return 0; return 0;
} }
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
* check to see if both A and B are present (or absent) * check to see if both A and B are present (or absent)
*/ */
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/wait.h>
#include "test.h" #include "test.h"
const int envflags = DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN; const int envflags = DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN;
...@@ -125,6 +124,8 @@ do_x1_recover_only (void) { ...@@ -125,6 +124,8 @@ do_x1_recover_only (void) {
const char *cmd; const char *cmd;
#if 0
static void static void
do_test_internal (BOOL commit) { do_test_internal (BOOL commit) {
pid_t pid; pid_t pid;
...@@ -164,6 +165,8 @@ do_test (void) { ...@@ -164,6 +165,8 @@ do_test (void) {
do_test_internal(FALSE); do_test_internal(FALSE);
} }
#endif
BOOL do_commit=FALSE, do_abort=FALSE, do_explicit_abort=FALSE, do_recover_committed=FALSE, do_recover_aborted=FALSE, do_recover_only=FALSE; BOOL do_commit=FALSE, do_abort=FALSE, do_explicit_abort=FALSE, do_recover_committed=FALSE, do_recover_aborted=FALSE, do_recover_only=FALSE;
static void static void
...@@ -233,8 +236,11 @@ test_main (int argc, char *argv[]) { ...@@ -233,8 +236,11 @@ test_main (int argc, char *argv[]) {
do_x1_recover(FALSE); do_x1_recover(FALSE);
} else if (do_recover_only) { } else if (do_recover_only) {
do_x1_recover_only(); do_x1_recover_only();
} else { }
#if 0
else {
do_test(); do_test();
} }
#endif
return 0; return 0;
} }
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
* check to see if both rows are present in A and maybe present in B * check to see if both rows are present in A and maybe present in B
*/ */
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/wait.h>
#include "test.h" #include "test.h"
const int envflags = DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN; const int envflags = DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN;
...@@ -114,6 +113,8 @@ do_x2_recover (BOOL did_commit) { ...@@ -114,6 +113,8 @@ do_x2_recover (BOOL did_commit) {
const char *cmd; const char *cmd;
#if 0
static void static void
do_test_internal (BOOL commit) { do_test_internal (BOOL commit) {
pid_t pid; pid_t pid;
...@@ -153,6 +154,8 @@ do_test (void) { ...@@ -153,6 +154,8 @@ do_test (void) {
do_test_internal(FALSE); do_test_internal(FALSE);
} }
#endif
BOOL do_commit=FALSE, do_abort=FALSE, do_recover_committed=FALSE, do_recover_aborted=FALSE; BOOL do_commit=FALSE, do_abort=FALSE, do_recover_committed=FALSE, do_recover_aborted=FALSE;
static void static void
...@@ -212,8 +215,11 @@ test_main (int argc, char *argv[]) { ...@@ -212,8 +215,11 @@ test_main (int argc, char *argv[]) {
do_x2_recover(TRUE); do_x2_recover(TRUE);
} else if (do_recover_aborted) { } else if (do_recover_aborted) {
do_x2_recover(FALSE); do_x2_recover(FALSE);
} else { }
#if 0
else {
do_test(); do_test();
} }
#endif
return 0; return 0;
} }
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
* check to see if both rows are present in A and maybe present in B * check to see if both rows are present in A and maybe present in B
*/ */
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/wait.h>
#include "test.h" #include "test.h"
const int envflags = DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN; const int envflags = DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN;
...@@ -114,6 +113,8 @@ do_x2_recover (BOOL did_commit) { ...@@ -114,6 +113,8 @@ do_x2_recover (BOOL did_commit) {
const char *cmd; const char *cmd;
#if 0
static void static void
do_test_internal (BOOL commit) { do_test_internal (BOOL commit) {
pid_t pid; pid_t pid;
...@@ -153,6 +154,8 @@ do_test (void) { ...@@ -153,6 +154,8 @@ do_test (void) {
do_test_internal(FALSE); do_test_internal(FALSE);
} }
#endif
BOOL do_commit=FALSE, do_abort=FALSE, do_recover_committed=FALSE, do_recover_aborted=FALSE; BOOL do_commit=FALSE, do_abort=FALSE, do_recover_committed=FALSE, do_recover_aborted=FALSE;
static void static void
...@@ -212,8 +215,11 @@ test_main (int argc, char *argv[]) { ...@@ -212,8 +215,11 @@ test_main (int argc, char *argv[]) {
do_x2_recover(TRUE); do_x2_recover(TRUE);
} else if (do_recover_aborted) { } else if (do_recover_aborted) {
do_x2_recover(FALSE); do_x2_recover(FALSE);
} else { }
#if 0
else {
do_test(); do_test();
} }
#endif
return 0; return 0;
} }
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