diff options
author | Keith Bostic <keith@wiredtiger.com> | 2013-04-19 16:47:10 -0400 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2013-04-19 16:47:10 -0400 |
commit | 39a12d4412eff99d3951bd5abebf5a477b6aa481 (patch) | |
tree | 3f284f0236753cea77f1eb1690192780bca03a9a /test | |
parent | 730dc920ad954f1f8df020a46a02fdf10585d763 (diff) | |
download | mongo-39a12d4412eff99d3951bd5abebf5a477b6aa481.tar.gz |
First cut at a non-transactional version of the STEC KVS shared library.
Diffstat (limited to 'test')
-rw-r--r-- | test/format/config.c | 6 | ||||
-rw-r--r-- | test/format/format.h | 8 | ||||
-rw-r--r-- | test/format/wts.c | 19 |
3 files changed, 15 insertions, 18 deletions
diff --git a/test/format/config.c b/test/format/config.c index 012aa95b836..1b6541d20da 100644 --- a/test/format/config.c +++ b/test/format/config.c @@ -126,6 +126,12 @@ config_setup(void) *cp->v = CONF_RAND(cp); } + /* KVS requires shared libraries. */ + if (DATASOURCE("kvsbdb") && access(KVS_BDB_PATH, R_OK) != 0) + die(errno, "kvsbdb shared library: %s", KVS_BDB_PATH); + if (DATASOURCE("kvsstec") && access(KVS_STEC_PATH, R_OK) != 0) + die(errno, "kvsstec shared library: %s", KVS_STEC_PATH); + /* KVS doesn't support user-specified collations. */ if (DATASOURCE("kvsbdb") || DATASOURCE("kvsstec")) g.c_reverse = 0; diff --git a/test/format/format.h b/test/format/format.h index 0d6dcd26b50..f0d1586b751 100644 --- a/test/format/format.h +++ b/test/format/format.h @@ -49,14 +49,19 @@ extern WT_EXTENSION_API *wt_api; #define EXTPATH "../../ext/" /* Extensions path */ + #define BZIP_PATH \ EXTPATH "compressors/bzip2/.libs/libwiredtiger_bzip2.so" #define SNAPPY_PATH \ EXTPATH "compressors/snappy/.libs/libwiredtiger_snappy.so" + #define REVERSE_PATH \ EXTPATH "collators/reverse/.libs/libwiredtiger_reverse_collator.so" + #define KVS_BDB_PATH \ EXTPATH "test/kvs_bdb/.libs/libwiredtiger_kvs_bdb.so" +#define KVS_STEC_PATH \ + EXTPATH "test/kvs_stec/.libs/libwiredtiger_kvs_stec.so" #define LZO_PATH ".libs/lzo_compress.so" #define RAW_PATH ".libs/raw_compress.so" @@ -194,6 +199,3 @@ void wts_read_scan(void); void wts_salvage(void); void wts_stats(void); void wts_verify(const char *); - -void wiredtiger_kvs_stec_close(WT_CONNECTION *); -void wiredtiger_kvs_stec_init(WT_CONNECTION *); diff --git a/test/format/wts.c b/test/format/wts.c index 389a411d1bb..5b3e58a4667 100644 --- a/test/format/wts.c +++ b/test/format/wts.c @@ -77,7 +77,9 @@ wts_open(void) snprintf(config, sizeof(config), "create,sync=false,cache_size=%" PRIu32 "MB," "error_prefix=\"%s\"," - "extensions=[\"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\"],%s,%s", + "extensions=" + "[\"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\", \"%s\"]," + "%s,%s", g.c_cache, g.progname, REVERSE_PATH, @@ -87,6 +89,7 @@ wts_open(void) access(BZIP_PATH, R_OK) == 0) ? RAW_PATH : "", access(SNAPPY_PATH, R_OK) == 0 ? SNAPPY_PATH : "", access(KVS_BDB_PATH, R_OK) == 0 ? KVS_BDB_PATH : "", + access(KVS_STEC_PATH, R_OK) == 0 ? KVS_STEC_PATH : "", g.c_config_open == NULL ? "" : g.c_config_open, g.config_open == NULL ? "" : g.config_open); @@ -97,14 +100,6 @@ wts_open(void) /* Load extension functions. */ wt_api = conn->get_extension_api(conn); - /* Open any underlying key/value store data-source. */ - if (DATASOURCE("kvsstec")) -#if 0 - wiredtiger_kvs_stec_init(conn); -#else - die(ENOTSUP, "kvsstec not loaded"); -#endif - if ((ret = conn->open_session(conn, NULL, NULL, &session)) != 0) die(ret, "connection.open_session"); @@ -230,12 +225,6 @@ wts_close() conn = g.wts_conn; - if (DATASOURCE("kvsstec")) -#if 0 - wiredtiger_kvs_stec_close(conn); -#else - die(ENOTSUP, "kvsstec not loaded"); -#endif if ((ret = conn->close(conn, NULL)) != 0) die(ret, "connection.close"); } |