summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/test/utility/test_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/third_party/wiredtiger/test/utility/test_util.h')
-rw-r--r--src/third_party/wiredtiger/test/utility/test_util.h26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/third_party/wiredtiger/test/utility/test_util.h b/src/third_party/wiredtiger/test/utility/test_util.h
index a7af77dd7d7..73ab9ed4427 100644
--- a/src/third_party/wiredtiger/test/utility/test_util.h
+++ b/src/third_party/wiredtiger/test/utility/test_util.h
@@ -49,6 +49,16 @@
#include "windows_shim.h"
#endif
+#define TESTUTIL_ENV_CONFIG_TIERED \
+ ",tiered_storage=(bucket=./" \
+ "bucket,bucket_prefix=pfx-,local_retention=2,name=dir_store)"
+#define TESTUTIL_ENV_CONFIG_TIERED_EXT \
+ ",extensions=(../../../../ext/storage_sources/dir_store/" \
+ "libwiredtiger_dir_store.so=(early_load=true))"
+#define TESTUTIL_ENV_CONFIG_REC \
+ ",log=(recover=on,remove=false),statistics=(all),statistics_log=(json,on_close,wait=1)"
+#define TESTUTIL_ENV_CONFIG_COMPAT ",compatibility=(release=\"2.9\")"
+
/* Generic option parsing structure shared by all test cases. */
typedef struct {
char *home;
@@ -69,10 +79,13 @@ typedef struct {
FILE *progress_fp; /* Progress tracking file */
char *progress_file_name;
+ bool compat; /* Compatibility */
bool do_data_ops; /* Have schema ops use data */
+ bool inmem; /* In-memory */
bool preserve; /* Don't remove files on exit */
bool tiered_storage; /* Configure tiered storage */
bool verbose; /* Run in verbose mode */
+ bool tiered_begun; /* Tiered storage ready */
uint64_t nrecords; /* Number of records */
uint64_t nops; /* Number of operations */
uint64_t nthreads; /* Number of threads */
@@ -80,13 +93,16 @@ typedef struct {
uint64_t n_read_threads; /* Number of read threads */
uint64_t n_write_threads; /* Number of write threads */
+ uint64_t tiered_flush_interval_us; /* Microseconds between flush_tier calls */
+ uint64_t tiered_flush_next_us; /* Next tiered flush in epoch microseconds */
+
/*
* Fields commonly shared within a test program. The test cleanup function will attempt to
* automatically free and close non-null resources.
*/
WT_CONNECTION *conn;
WT_SESSION *session;
- bool running;
+ volatile bool running; /* Whether to stop */
char *uri;
volatile uint64_t next_threadid;
uint64_t unique_id;
@@ -374,6 +390,8 @@ void testutil_copy_data(const char *);
void testutil_copy_file(WT_SESSION *, const char *);
void testutil_copy_if_exists(WT_SESSION *, const char *);
void testutil_create_backup_directory(const char *);
+int testutil_general_event_handler(
+ WT_EVENT_HANDLER *, WT_CONNECTION *, WT_SESSION *, WT_EVENT_TYPE, void *);
void testutil_make_work_dir(const char *);
void testutil_modify_apply(WT_ITEM *, WT_ITEM *, WT_MODIFY *, int, uint8_t);
void testutil_parse_begin_opt(int, char *const *, const char *, TEST_OPTS *);
@@ -385,6 +403,12 @@ void testutil_progress(TEST_OPTS *, const char *);
#ifndef _WIN32
void testutil_sleep_wait(uint32_t, pid_t);
#endif
+void testutil_wiredtiger_open(
+ TEST_OPTS *, const char *, WT_EVENT_HANDLER *, WT_CONNECTION **, bool);
+void testutil_tiered_begin(TEST_OPTS *);
+void testutil_tiered_flush_complete(TEST_OPTS *, WT_SESSION *, void *);
+void testutil_tiered_sleep(TEST_OPTS *, WT_SESSION *, uint32_t, bool *);
+uint64_t testutil_time_us(WT_SESSION *);
void testutil_work_dir_from_path(char *, size_t, const char *);
WT_THREAD_RET thread_append(void *);