mirror of
https://github.com/MariaDB/server.git
synced 2025-02-02 03:51:50 +01:00
Addresses #1338
src tests now call toku_ydb_init/destroy (if in windows) Linux uses .so constructor/destructor methods git-svn-id: file:///svn/toku/tokudb.1032b@8398 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
3663cbb8db
commit
1064ced586
162 changed files with 411 additions and 218 deletions
|
@ -105,7 +105,8 @@ test_shutdown (void) {
|
|||
r=env->close(env, 0); CKERR(r);
|
||||
}
|
||||
|
||||
int main (int argc, const char *argv[]) {
|
||||
int
|
||||
test_main (int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
setup();
|
||||
test_abort_abort();
|
||||
|
|
|
@ -105,7 +105,8 @@ test_shutdown (void) {
|
|||
r=env->close(env, 0); CKERR(r);
|
||||
}
|
||||
|
||||
int main (int argc, const char *argv[]) {
|
||||
int
|
||||
test_main (int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
setup();
|
||||
test_abort_commit();
|
||||
|
|
|
@ -101,7 +101,8 @@ test_shutdown (void) {
|
|||
r=env->close(env, 0); CKERR(r);
|
||||
}
|
||||
|
||||
int main (int argc, const char *argv[]) {
|
||||
int
|
||||
test_main (int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
setup();
|
||||
test_commit_abort();
|
||||
|
|
|
@ -101,7 +101,8 @@ test_shutdown (void) {
|
|||
r=env->close(env, 0); CKERR(r);
|
||||
}
|
||||
|
||||
int main (int argc, const char *argv[]) {
|
||||
int
|
||||
test_main (int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
setup();
|
||||
test_commit_commit();
|
||||
|
|
|
@ -62,7 +62,8 @@ do_627 (void) {
|
|||
|
||||
}
|
||||
|
||||
int main (int argc, const char *argv[]) {
|
||||
int
|
||||
test_main (int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
do_627();
|
||||
return 0;
|
||||
|
|
|
@ -95,7 +95,8 @@ doit (BOOL committed_provdels) {
|
|||
r=txn->commit(txn, 0); CKERR(r);
|
||||
}
|
||||
|
||||
int main (int argc, const char *argv[]) {
|
||||
int
|
||||
test_main (int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
|
||||
setup();
|
||||
|
|
|
@ -59,7 +59,8 @@ doit (void) {
|
|||
r=txn->commit(txn, 0); assert(r==0);
|
||||
}
|
||||
|
||||
int main (int argc, const char *argv[]) {
|
||||
int
|
||||
test_main (int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
|
||||
test_setup();
|
||||
|
|
|
@ -13,7 +13,8 @@ void *startb(void* ignore __attribute__((__unused__))) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int main (int argc, const char *argv[]) {
|
||||
int
|
||||
test_main (int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
pthread_t a,b;
|
||||
{ int x_l = pthread_create(&a, NULL, starta, NULL); assert(x_l==0); }
|
||||
|
|
|
@ -83,7 +83,8 @@ void *startb(void* ignore __attribute__((__unused__))) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int main (int argc, const char *argv[]) {
|
||||
int
|
||||
test_main (int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
pthread_t a,b;
|
||||
initialize();
|
||||
|
|
|
@ -83,7 +83,8 @@ void *startb(void* ignore __attribute__((__unused__))) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int main (int argc, const char *argv[]) {
|
||||
int
|
||||
test_main (int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
pthread_t a,b;
|
||||
initialize();
|
||||
|
|
|
@ -67,7 +67,8 @@ static void test (void) {
|
|||
r = env->close(env, 0); assert(r==0);
|
||||
}
|
||||
|
||||
int main (int argc , const char *argv[]) {
|
||||
int
|
||||
test_main (int argc , const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
test();
|
||||
return 0;
|
||||
|
|
|
@ -90,7 +90,8 @@ static void test (void) {
|
|||
r = env->close(env, 0); assert(r==0);
|
||||
}
|
||||
|
||||
int main (int argc , const char *argv[]) {
|
||||
int
|
||||
test_main (int argc , const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
test();
|
||||
return 0;
|
||||
|
|
|
@ -76,7 +76,8 @@ static void test (void) {
|
|||
r = env->close(env, 0); assert(r==0);
|
||||
}
|
||||
|
||||
int main (int argc , const char *argv[]) {
|
||||
int
|
||||
test_main (int argc , const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
test();
|
||||
return 0;
|
||||
|
|
|
@ -79,7 +79,8 @@ static void test (void) {
|
|||
r = env->close(env, 0); assert(r==0);
|
||||
}
|
||||
|
||||
int main (int argc , const char *argv[]) {
|
||||
int
|
||||
test_main (int argc , const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
test();
|
||||
return 0;
|
||||
|
|
|
@ -72,7 +72,8 @@ doit (void) {
|
|||
printf("%lld insertions in %9.6fs, %9.3f ins/s \n", ninserts, diff, ninserts/diff);
|
||||
}
|
||||
|
||||
int main (int argc, const char *argv[]) {
|
||||
int
|
||||
test_main (int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
|
||||
test_setup();
|
||||
|
|
|
@ -110,7 +110,8 @@ test_shutdown (void) {
|
|||
r=env->close(env, 0); CKERR(r);
|
||||
}
|
||||
|
||||
int main (int argc, const char *argv[]) {
|
||||
int
|
||||
test_main (int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
test_setup();
|
||||
test_commit_commit();
|
||||
|
|
|
@ -49,7 +49,8 @@ static void test (void) {
|
|||
r=env->close(env, 0); CKERR(r);
|
||||
}
|
||||
|
||||
int main (int argc __attribute__((__unused__)), char *argv[] __attribute__((__unused__))) {
|
||||
int
|
||||
test_main (int argc __attribute__((__unused__)), const char *argv[] __attribute__((__unused__))) {
|
||||
test();
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -66,7 +66,8 @@ static void test (void) {
|
|||
r=env->close(env, 0); CKERR(r);
|
||||
}
|
||||
|
||||
int main (int argc __attribute__((__unused__)), char *argv[] __attribute__((__unused__))) {
|
||||
int
|
||||
test_main (int argc __attribute__((__unused__)), const char *argv[] __attribute__((__unused__))) {
|
||||
test();
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -79,7 +79,8 @@ static void test (void) {
|
|||
r=env->close(env, 0); CKERR(r);
|
||||
}
|
||||
|
||||
int main (int argc __attribute__((__unused__)), char *argv[] __attribute__((__unused__))) {
|
||||
int
|
||||
test_main (int argc __attribute__((__unused__)), const char *argv[] __attribute__((__unused__))) {
|
||||
test();
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include <db.h>
|
||||
#include <assert.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include "ydb.h"
|
||||
#ifndef DB_YESOVERWRITE
|
||||
#define DB_YESOVERWRITE 0
|
||||
#endif
|
||||
|
@ -101,3 +101,17 @@ typedef enum __toku_bool { FALSE=0, TRUE=1} BOOL;
|
|||
#define SET_TRACE_FILE(x) ((void)0)
|
||||
#define CLOSE_TRACE_FILE(x) ((void)0)
|
||||
#endif
|
||||
|
||||
int test_main (int argc, const char *argv[]);
|
||||
int
|
||||
main(int argc, const char *argv[]) {
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
toku_ydb_init();
|
||||
#endif
|
||||
int r = test_main(argc, argv);
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
toku_ydb_destroy();
|
||||
#endif
|
||||
return r;
|
||||
}
|
||||
|
||||
|
|
|
@ -117,7 +117,8 @@ run (int choice) {
|
|||
#endif
|
||||
}
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
|
||||
system("rm -rf " ENVDIR);
|
||||
|
|
|
@ -49,7 +49,8 @@ run (void) {
|
|||
}
|
||||
}
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
|
||||
system("rm -rf " ENVDIR);
|
||||
|
|
|
@ -50,7 +50,8 @@ run (void) {
|
|||
}
|
||||
}
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
|
||||
system("rm -rf " ENVDIR);
|
||||
|
|
|
@ -107,7 +107,8 @@ run (int choice) {
|
|||
#endif
|
||||
}
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
|
||||
system("rm -rf " ENVDIR);
|
||||
|
|
|
@ -104,7 +104,8 @@ run (int choice) {
|
|||
#endif
|
||||
}
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
|
||||
system("rm -rf " ENVDIR);
|
||||
|
|
|
@ -135,7 +135,8 @@ test_789(void) {
|
|||
r = env->close(env, 0); assert(r == 0);
|
||||
}
|
||||
|
||||
int main(int UU(argc), char UU(*argv[])) {
|
||||
int
|
||||
test_main(int UU(argc), const char UU(*argv[])) {
|
||||
test_789();
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -77,7 +77,8 @@ testit (const int klen, const int vlen, const int n, const int lastvlen) {
|
|||
r = env->close(env, 0); assert(r == 0);
|
||||
}
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
const int meg = 1024*1024;
|
||||
const int headeroverhead = 12*4;
|
||||
|
|
|
@ -157,7 +157,8 @@ test_db_put_aborts (void) {
|
|||
r=env->close(env, 0); assert(r==0);
|
||||
}
|
||||
|
||||
int main (int UU(argc), char UU(*argv[])) {
|
||||
int
|
||||
test_main (int UU(argc), const char UU(*argv[])) {
|
||||
test_db_open_aborts();
|
||||
test_db_put_aborts();
|
||||
return 0;
|
||||
|
|
|
@ -109,7 +109,8 @@ do_test_abort2 (void) {
|
|||
|
||||
}
|
||||
|
||||
int main (int argc, const char *argv[]) {
|
||||
int
|
||||
test_main (int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
do_test_abort2();
|
||||
return 0;
|
||||
|
|
|
@ -159,7 +159,8 @@ test_abort3 (void) {
|
|||
r=env->close(env, 0); CKERR(r);
|
||||
}
|
||||
|
||||
int main (int argc, const char *argv[]) {
|
||||
int
|
||||
test_main (int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
test_abort3();
|
||||
return 0;
|
||||
|
|
|
@ -124,7 +124,8 @@ do_abort_delete_first_or_last(int N,
|
|||
#endif
|
||||
}
|
||||
|
||||
int main (int argc, const char *argv[]) {
|
||||
int
|
||||
test_main (int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
int f;
|
||||
for (f=0; f<2; f++) {
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
|
||||
|
||||
|
||||
int main (int argc, const char *argv[]) {
|
||||
int
|
||||
test_main (int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
DB_ENV *env;
|
||||
DB *db;
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
#include <sys/stat.h>
|
||||
#include "test.h"
|
||||
|
||||
int main (int argc, const char *argv[]) {
|
||||
int
|
||||
test_main (int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
DB_ENV *env;
|
||||
DB *db;
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
#include <sys/stat.h>
|
||||
#include "test.h"
|
||||
|
||||
int main (int argc, const char *argv[]) {
|
||||
int
|
||||
test_main (int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
DB_ENV *env;
|
||||
DB *db, *db2;
|
||||
|
|
|
@ -79,7 +79,8 @@ test_cachesize (void) {
|
|||
}
|
||||
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
test_cachesize();
|
||||
|
||||
|
|
|
@ -78,7 +78,8 @@ test_cursor (void) {
|
|||
r = env->close(env, 0); assert(r == 0);
|
||||
}
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
|
||||
parse_args(argc, argv);
|
||||
|
||||
|
|
|
@ -90,7 +90,8 @@ test (void) {
|
|||
r = env->close(env, 0); assert(r == 0);
|
||||
}
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
|
||||
parse_args(argc, argv);
|
||||
|
||||
|
|
|
@ -177,7 +177,8 @@ static void run_test(u_int32_t dup_flags) {
|
|||
/* ********************************************************************** */
|
||||
}
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
|
||||
parse_args(argc, argv);
|
||||
|
||||
|
|
|
@ -116,7 +116,8 @@ test_reopen (void) {
|
|||
r = db->close(db, 0); assert(r == 0);
|
||||
}
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
|
||||
system("rm -rf " ENVDIR);
|
||||
|
|
|
@ -151,7 +151,8 @@ test_cursor_delete_dupsort (void) {
|
|||
r = db->close(db, 0); assert(r == 0);
|
||||
}
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
int r;
|
||||
|
||||
parse_args(argc, argv);
|
||||
|
|
|
@ -60,7 +60,8 @@ test_cursor_delete2 (void) {
|
|||
r = dbenv->close(dbenv, 0); CKERR(r);
|
||||
}
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
|
||||
parse_args(argc, argv);
|
||||
|
||||
|
|
|
@ -62,7 +62,8 @@ test_cursor_delete2 (void) {
|
|||
r = dbenv->close(dbenv, 0); CKERR(r);
|
||||
}
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
|
||||
parse_args(argc, argv);
|
||||
|
||||
|
|
|
@ -68,7 +68,9 @@ cursor_range_with_delete (u_int32_t flag) {
|
|||
r = dbc->c_close(dbc); CKERR(r);
|
||||
}
|
||||
|
||||
int main() {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
setup_db("next.db");
|
||||
insert();
|
||||
cursor_range_with_delete(DB_NEXT);
|
||||
|
|
|
@ -40,7 +40,8 @@ test_cursor_flags (int cursor_flags, int expectr) {
|
|||
r = db->close(db, 0); assert(r == 0);
|
||||
}
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
|
||||
parse_args(argc, argv);
|
||||
|
||||
|
|
|
@ -88,7 +88,8 @@ test_cursor_nonleaf_expand (int n, int reverse) {
|
|||
r = db->close(db, 0); assert(r == 0);
|
||||
}
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
|
||||
system("rm -rf " ENVDIR);
|
||||
|
|
|
@ -171,7 +171,9 @@ test (u_int32_t dup_flags) {
|
|||
/* ********************************************************************** */
|
||||
}
|
||||
|
||||
int main() {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
test(0);
|
||||
test(DB_DUP | DB_DUPSORT);
|
||||
return 0;
|
||||
|
|
|
@ -76,7 +76,8 @@ test_cursor_sticky (int n, int dup_mode) {
|
|||
}
|
||||
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
int r;
|
||||
int i;
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
/* -*- mode: C; c-basic-offset: 4 -*- */
|
||||
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
|
||||
|
||||
#include "test.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <sys/stat.h>
|
||||
#include <stdio.h>
|
||||
|
@ -12,9 +14,9 @@
|
|||
|
||||
// ENVDIR is defined in the Makefile
|
||||
|
||||
#define CKERR(r) if (r!=0) fprintf(stderr, "%s:%d error %d %s\n", __FILE__, __LINE__, r, db_strerror(r)); assert(r==0);
|
||||
|
||||
int main() {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
DB_ENV * const null_env = 0;
|
||||
DB *db;
|
||||
DB_TXN * const null_txn = 0;
|
||||
|
|
|
@ -510,7 +510,8 @@ maybe_parse_intarg (const char *progname, const char *arg, const char *cmdname,
|
|||
}
|
||||
}
|
||||
|
||||
int main (int argc, const char *argv[]) {
|
||||
int
|
||||
test_main (int argc, const char *argv[]) {
|
||||
const char *progname=argv[0];
|
||||
int useseed;
|
||||
int activity_count = 100000;
|
||||
|
|
|
@ -16,7 +16,8 @@
|
|||
DB_ENV *env;
|
||||
DB *db;
|
||||
|
||||
int main (int UU(argc), char UU(*argv[])) {
|
||||
int
|
||||
test_main (int UU(argc), const char UU(*argv[])) {
|
||||
int r;
|
||||
system("rm -rf " ENVDIR);
|
||||
r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); assert(r==0);
|
||||
|
|
|
@ -17,7 +17,8 @@ DB_ENV *env;
|
|||
DB *db;
|
||||
DB_TXN* null_txn = NULL;
|
||||
|
||||
int main (int UU(argc), char UU(*argv[])) {
|
||||
int
|
||||
test_main (int UU(argc), const char UU(*argv[])) {
|
||||
int r;
|
||||
system("rm -rf " ENVDIR);
|
||||
r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r);
|
||||
|
|
|
@ -481,7 +481,8 @@ usage (const char *argv1) {
|
|||
exit(1);
|
||||
}
|
||||
|
||||
int main (int argc, const char *argv[]) {
|
||||
int
|
||||
test_main (int argc, const char *argv[]) {
|
||||
const char *progname=argv[0];
|
||||
int useseed;
|
||||
|
||||
|
|
|
@ -299,7 +299,8 @@ static void usage (const char *argv1) {
|
|||
exit(1);
|
||||
}
|
||||
|
||||
int main (int argc, const char *argv[]) {
|
||||
int
|
||||
test_main (int argc, const char *argv[]) {
|
||||
const char *progname=argv[0];
|
||||
int useseed = 1;
|
||||
|
||||
|
|
|
@ -136,7 +136,8 @@ close_dbs(void) {
|
|||
r = sdb->close(sdb, 0); CKERR(r);
|
||||
}
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
int i;
|
||||
|
||||
parse_args(argc, argv);
|
||||
|
|
|
@ -269,7 +269,8 @@ cursor_setup (DBC* dbc, u_int32_t flag) {
|
|||
|
||||
}
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
int i;
|
||||
int r;
|
||||
DBC* dbc;
|
||||
|
|
|
@ -57,7 +57,8 @@ close_dbs (void) {
|
|||
r = db->close(db, 0); CKERR(r);
|
||||
}
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
int i;
|
||||
int r;
|
||||
|
||||
|
|
|
@ -162,7 +162,8 @@ test_db_delboth (int n, int dup_mode) {
|
|||
}
|
||||
#endif //USE_TDB
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
|
||||
|
||||
|
|
|
@ -135,7 +135,8 @@ test_db_get_datasize0 (void) {
|
|||
assert(r == 0);
|
||||
}
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
|
||||
test_db_get_datasize0();
|
||||
|
|
|
@ -124,7 +124,8 @@ close_dbs (void) {
|
|||
r = sdb->close(sdb, 0); CKERR(r);
|
||||
}
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
int i;
|
||||
|
||||
parse_args(argc, argv);
|
||||
|
|
|
@ -1,12 +1,16 @@
|
|||
/* -*- mode: C; c-basic-offset: 4 -*- */
|
||||
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
|
||||
|
||||
#include "test.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include <toku_portability.h>
|
||||
#include <db.h>
|
||||
|
||||
int main() {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
DB_ENV *dbenv;
|
||||
int r;
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
/* -*- mode: C; c-basic-offset: 4 -*- */
|
||||
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
|
||||
|
||||
#include "test.h"
|
||||
|
||||
// make stdlib define unsetenv()
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
|
@ -63,7 +65,9 @@ reinit_config (int set_home, int set_DB_ENVIRON, int set_DB_HOME) {
|
|||
|
||||
}
|
||||
|
||||
int main() {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
DB_ENV *env;
|
||||
DB_TXN * const null_txn = 0;
|
||||
DB *db;
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
/* -*- mode: C; c-basic-offset: 4 -*- */
|
||||
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
|
||||
|
||||
#include "test.h"
|
||||
|
||||
// Try to open an environment where the directory does not exist
|
||||
// Try when the dir exists but is not an initialized env
|
||||
// Try when the dir exists and we do DB_CREATE: it should work.
|
||||
|
@ -20,9 +22,10 @@
|
|||
#include <unistd.h>
|
||||
|
||||
// ENVDIR is defined in the Makefile
|
||||
#define CKERR(r) if (r!=0) fprintf(stderr, "%s:%d error %d %s\n", __FILE__, __LINE__, r, db_strerror(r)); assert(r==0);
|
||||
|
||||
int main() {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
DB_ENV *dbenv;
|
||||
int r;
|
||||
int do_private;
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
/* -*- mode: C; c-basic-offset: 4 -*- */
|
||||
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
|
||||
|
||||
#include "test.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include <toku_portability.h>
|
||||
|
@ -12,12 +14,10 @@
|
|||
|
||||
// ENVDIR is defined in the Makefile
|
||||
|
||||
#define CKERR(r) if (r!=0) fprintf(stderr, "%s:%d error %d %s\n", __FILE__, __LINE__, r, db_strerror(r)); assert(r==0);
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
int
|
||||
test_main(int argc, const char** argv) {
|
||||
DB_ENV *dbenv;
|
||||
int r;
|
||||
int __attribute__((__unused__)) verbose = 0;
|
||||
if (argc == 2 && !strcmp(argv[1], "-v")) verbose = 1;
|
||||
|
||||
system("rm -rf " ENVDIR);
|
||||
|
|
|
@ -13,7 +13,9 @@
|
|||
|
||||
// ENVDIR is defined in the Makefile
|
||||
|
||||
int main() {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
DB_ENV *dbenv;
|
||||
int r;
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
/* -*- mode: C; c-basic-offset: 4 -*- */
|
||||
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
|
||||
|
||||
#include "test.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include <toku_portability.h>
|
||||
|
@ -11,7 +13,9 @@
|
|||
|
||||
// ENVDIR is defined in the Makefile
|
||||
|
||||
int main() {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
DB_ENV *dbenv;
|
||||
int r;
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
/* -*- mode: C; c-basic-offset: 4 -*- */
|
||||
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
|
||||
|
||||
#include "test.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include <toku_portability.h>
|
||||
|
@ -10,11 +12,11 @@
|
|||
#include <sys/types.h>
|
||||
#include <errno.h>
|
||||
|
||||
#define CKERR(r) if (r!=0) fprintf(stderr, "%s:%d error %d %s\n", __FILE__, __LINE__, r, db_strerror(r)); assert(r==0);
|
||||
|
||||
// ENVDIR is defined in the Makefile
|
||||
|
||||
int main() {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
DB_ENV *dbenv;
|
||||
int r;
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
/* -*- mode: C; c-basic-offset: 4 -*- */
|
||||
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
|
||||
|
||||
#include "test.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include <toku_portability.h>
|
||||
|
@ -10,11 +12,11 @@
|
|||
#include <sys/types.h>
|
||||
#include <errno.h>
|
||||
|
||||
#define CKERR(r) if (r!=0) fprintf(stderr, "%s:%d error %d %s\n", __FILE__, __LINE__, r, db_strerror(r)); assert(r==0);
|
||||
|
||||
// ENVDIR is defined in the Makefile
|
||||
|
||||
int main() {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
DB_ENV *dbenv;
|
||||
int r;
|
||||
|
||||
|
|
|
@ -16,7 +16,8 @@
|
|||
DB_ENV *env;
|
||||
DB *db;
|
||||
|
||||
int main (int UU(argc), char UU(*argv[])) {
|
||||
int
|
||||
test_main (int UU(argc), const char UU(*argv[])) {
|
||||
int r;
|
||||
r=system("rm -rf " ENVDIR); assert(r==0);
|
||||
r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); assert(r==0);
|
||||
|
|
|
@ -239,7 +239,8 @@ setup_secondary (u_int32_t flags) {
|
|||
r = dbp->associate(dbp, NULL, sdbp, identity_callback, 0); CKERR(r);
|
||||
}
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
int i;
|
||||
|
||||
parse_args(argc, argv);
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
|
||||
#include "test.h"
|
||||
|
||||
int main (int UU(argc), char UU(*argv[])) {
|
||||
int
|
||||
test_main (int UU(argc), const char UU(*argv[])) {
|
||||
DB *db;
|
||||
int r;
|
||||
r = db_create(&db, 0, 0);
|
||||
|
|
|
@ -16,7 +16,8 @@
|
|||
DB_ENV *env;
|
||||
DB *db;
|
||||
|
||||
int main (int UU(argc), char UU(*argv[])) {
|
||||
int
|
||||
test_main (int UU(argc), const char UU(*argv[])) {
|
||||
int r;
|
||||
system("rm -rf " ENVDIR);
|
||||
r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); assert(r==0);
|
||||
|
|
|
@ -19,7 +19,8 @@ DB *db;
|
|||
DBT key;
|
||||
DBT data;
|
||||
|
||||
int main (int UU(argc), char UU(*argv[])) {
|
||||
int
|
||||
test_main (int UU(argc), const char UU(*argv[])) {
|
||||
int r;
|
||||
system("rm -rf " ENVDIR);
|
||||
r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); assert(r==0);
|
||||
|
|
|
@ -19,7 +19,8 @@ DB *db;
|
|||
DBT key;
|
||||
DBT data;
|
||||
|
||||
int main (int UU(argc), char UU(*argv[])) {
|
||||
int
|
||||
test_main (int UU(argc), const char UU(*argv[])) {
|
||||
int r;
|
||||
system("rm -rf " ENVDIR);
|
||||
r=toku_os_mkdir(ENVDIR, S_IRWXU+S_IRWXG+S_IRWXO); assert(r==0);
|
||||
|
|
|
@ -188,7 +188,9 @@ verify_gone (void) {
|
|||
r = sdbp->pget(sdbp, null_txn, &skey, &key, &data, 0);assert(r == DB_NOTFOUND);
|
||||
}
|
||||
|
||||
int main() {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
int r;
|
||||
|
||||
system("rm -rf " ENVDIR);
|
||||
|
|
|
@ -33,7 +33,8 @@ test_db_set_flags (int flags, int expectr, int flags2, int expectr2) {
|
|||
r = db->close(db, 0); assert(r == 0);
|
||||
}
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
|
||||
parse_args(argc, argv);
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
/* -*- mode: C; c-basic-offset: 4 -*- */
|
||||
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
|
||||
|
||||
#include "test.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <sys/stat.h>
|
||||
#include <stdio.h>
|
||||
|
@ -11,9 +13,9 @@
|
|||
|
||||
// ENVDIR is defined in the Makefile
|
||||
|
||||
#define CKERR(r) if (r!=0) fprintf(stderr, "%s:%d error %d %s\n", __FILE__, __LINE__, r, db_strerror(r)); assert(r==0);
|
||||
|
||||
int main() {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
DB_ENV * env = 0;
|
||||
DB *db;
|
||||
DB_TXN * const null_txn = 0;
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
/* -*- mode: C; c-basic-offset: 4 -*- */
|
||||
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
|
||||
|
||||
#include "test.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <sys/stat.h>
|
||||
#include <stdio.h>
|
||||
|
@ -11,9 +13,9 @@
|
|||
|
||||
// ENVDIR is defined in the Makefile
|
||||
|
||||
#define CKERR(r) if (r!=0) fprintf(stderr, "%s:%d error %d %s\n", __FILE__, __LINE__, r, db_strerror(r)); assert(r==0);
|
||||
|
||||
int main() {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
DB_ENV * env = 0;
|
||||
DB *db;
|
||||
DB_TXN * const null_txn = 0;
|
||||
|
|
|
@ -873,7 +873,8 @@ test (u_int32_t dup_flags) {
|
|||
}
|
||||
|
||||
|
||||
int main(int argc, const char* argv[]) {
|
||||
int
|
||||
test_main(int argc, const char* argv[]) {
|
||||
parse_args(argc, argv);
|
||||
if (!IS_TDB) {
|
||||
if (verbose) {
|
||||
|
|
|
@ -216,7 +216,8 @@ test (u_int32_t dup_flags) {
|
|||
}
|
||||
|
||||
|
||||
int main(int argc, const char* argv[]) {
|
||||
int
|
||||
test_main(int argc, const char* argv[]) {
|
||||
parse_args(argc, argv);
|
||||
test(0);
|
||||
test(DB_DUP | DB_DUPSORT);
|
||||
|
|
|
@ -7,15 +7,11 @@
|
|||
|
||||
#include "test.h"
|
||||
|
||||
int main (int argc, char *argv[]) {
|
||||
int
|
||||
test_main (int argc, const char *argv[]) {
|
||||
const char *v;
|
||||
int major, minor, patch;
|
||||
int i;
|
||||
for (i=1; i<argc; i++) {
|
||||
char *arg = argv[i];
|
||||
if (strcmp(arg, "-v") == 0)
|
||||
verbose++;
|
||||
}
|
||||
parse_args(argc, argv);
|
||||
v = db_version(0, 0, 0);
|
||||
assert(v!=0);
|
||||
v = db_version(&major, &minor, &patch);
|
||||
|
|
|
@ -717,7 +717,8 @@ test_i0i1ci0_search (int n, int dup_mode) {
|
|||
assert(r == 0);
|
||||
}
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
int i;
|
||||
|
||||
parse_args(argc, argv);
|
||||
|
|
|
@ -218,7 +218,8 @@ test_put_00_01_01 (int dup_mode, u_int32_t put_flags) {
|
|||
r = db->close(db, 0); assert(r == 0);
|
||||
}
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
|
||||
int yes_overwrite=0;
|
||||
if (IS_TDB)
|
||||
|
|
|
@ -68,7 +68,8 @@ test_dup_flags (u_int32_t dup_flags) {
|
|||
r = db->close(db, 0); assert(r == 0);
|
||||
}
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
|
||||
parse_args(argc, argv);
|
||||
|
||||
|
|
|
@ -249,7 +249,8 @@ test_nonleaf_insert (int n, int dup_mode) {
|
|||
assert(r == 0);
|
||||
}
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
int i;
|
||||
|
||||
parse_args(argc, argv);
|
||||
|
|
|
@ -118,7 +118,8 @@ test_dup_next (int n, int dup_mode) {
|
|||
r = db->close(db, 0); assert(r == 0);
|
||||
}
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
int i;
|
||||
for (i = 1; i < argc; i++) {
|
||||
const char *arg = argv[i];
|
||||
|
|
|
@ -320,7 +320,8 @@ test_reverse_search (int n, int dup_mode) {
|
|||
assert(r == 0);
|
||||
}
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
int i;
|
||||
|
||||
parse_args(argc, argv);
|
||||
|
|
|
@ -99,7 +99,8 @@ test_dupsort_del (void) {
|
|||
r=env->close(env, 0); CKERR(r);
|
||||
}
|
||||
|
||||
int main (int argc, const char *argv[]) {
|
||||
int
|
||||
test_main (int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
test_dupsort_del();
|
||||
return 0;
|
||||
|
|
|
@ -106,7 +106,8 @@ test_abort3 (void) {
|
|||
r=env->close(env, 0); CKERR(r);
|
||||
}
|
||||
|
||||
int main (int argc, const char *argv[]) {
|
||||
int
|
||||
test_main (int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
test_abort3();
|
||||
return 0;
|
||||
|
|
|
@ -96,7 +96,8 @@ test_dupsort_delete (int n) {
|
|||
r = db->close(db, 0); assert(r == 0);
|
||||
}
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
int i;
|
||||
|
||||
parse_args(argc, argv);
|
||||
|
|
|
@ -118,7 +118,8 @@ test_dupsort_get (int n, int dup_mode) {
|
|||
}
|
||||
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
int i;
|
||||
|
||||
parse_args(argc, argv);
|
||||
|
|
|
@ -143,7 +143,8 @@ test_icdi_search (int n, int dup_mode) {
|
|||
}
|
||||
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
int i;
|
||||
|
||||
parse_args(argc, argv);
|
||||
|
|
|
@ -149,7 +149,8 @@ test_icdi_search (int n, int dup_mode) {
|
|||
}
|
||||
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
int i;
|
||||
|
||||
parse_args(argc, argv);
|
||||
|
|
|
@ -144,7 +144,8 @@ test_icdi_search (int n, int dup_mode) {
|
|||
}
|
||||
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
int i;
|
||||
|
||||
parse_args(argc, argv);
|
||||
|
|
|
@ -151,7 +151,8 @@ test_icdi_search (int n, int dup_mode) {
|
|||
}
|
||||
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
int i;
|
||||
|
||||
parse_args(argc, argv);
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
/* -*- mode: C; c-basic-offset: 4 -*- */
|
||||
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
|
||||
|
||||
#include "test.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <toku_portability.h>
|
||||
#include <db.h>
|
||||
|
@ -12,9 +14,8 @@
|
|||
|
||||
// ENVDIR is defined in the Makefile
|
||||
|
||||
#define CKERR(r) if (r!=0) fprintf(stderr, "%s:%d error %d %s\n", __FILE__, __LINE__, r, db_strerror(r)); assert(r==0);
|
||||
|
||||
int main (int argc __attribute__((__unused__)), char *argv[] __attribute__((__unused__))) {
|
||||
int
|
||||
test_main (int argc __attribute__((__unused__)), const char *argv[] __attribute__((__unused__))) {
|
||||
DB_ENV *env;
|
||||
int r;
|
||||
system("rm -rf " ENVDIR);
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
|
||||
#include "test.h"
|
||||
|
||||
int main (int UU(argc), char UU(*argv[])) {
|
||||
int
|
||||
test_main (int UU(argc), const char UU(*argv[])) {
|
||||
DB_ENV *env;
|
||||
DB *db;
|
||||
int r;
|
||||
|
|
|
@ -31,7 +31,8 @@ test_env_open_flags (int env_open_flags, int expectr) {
|
|||
assert(r == 0);
|
||||
}
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
|
||||
parse_args(argc, argv);
|
||||
|
||||
|
|
|
@ -13,7 +13,8 @@ handle_error (const DB_ENV *UU(dbenv), const char *errpfx, const char *UU(msg))
|
|||
assert(errpfx==expect_errpfx);
|
||||
n_handle_error++;
|
||||
}
|
||||
int main (int argc, const char *argv[]) {
|
||||
int
|
||||
test_main (int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
|
||||
#if defined(OSX)
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "test.h"
|
||||
#include <toku_pthread.h>
|
||||
|
||||
static void *
|
||||
|
@ -8,7 +10,9 @@ f (void *arg) {
|
|||
return arg;
|
||||
}
|
||||
|
||||
int main() {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
parse_args(argc, argv);
|
||||
toku_pthread_t t;
|
||||
int r = toku_pthread_create(&t, 0, f, 0); assert(r == 0);
|
||||
void *ret;
|
||||
|
|
|
@ -102,7 +102,8 @@ static void test_get_both(int n, int dup_mode, int op) {
|
|||
}
|
||||
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
int
|
||||
test_main(int argc, const char *argv[]) {
|
||||
unsigned long doi=0;
|
||||
int i;
|
||||
char flags = 0;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue