mirror of
https://github.com/isar/libmdbx.git
synced 2025-12-25 20:12:23 +08:00
lmdb-test: workaround for MDB_FIXEDMAP to avoid sporadic failures.
Change-Id: I6ba993ff50956d328fd76326c67aa83dff20ce48
This commit is contained in:
7
wbench.c
7
wbench.c
@@ -25,6 +25,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "lmdb.h"
|
||||
|
||||
@@ -33,7 +34,9 @@
|
||||
#define CHECK(test, msg) ((test) ? (void)0 : ((void)fprintf(stderr, \
|
||||
"%s:%d: %s: %s\n", __FILE__, __LINE__, msg, mdb_strerror(rc)), abort()))
|
||||
|
||||
#define DBPATH "./testdb"
|
||||
#ifndef DBPATH
|
||||
# define DBPATH "./testdb"
|
||||
#endif
|
||||
|
||||
struct t0 {
|
||||
struct rusage ru;
|
||||
@@ -124,7 +127,7 @@ static void wbench(int flags, int mb, int count, int salt)
|
||||
|
||||
E(mdb_env_create(&env));
|
||||
E(mdb_env_set_mapsize(env, (1ull << 20) * mb));
|
||||
E(mdb_env_open(env, "./testdb", flags, 0664));
|
||||
E(mdb_env_open(env, DBPATH, flags, 0664));
|
||||
|
||||
key.mv_size = sizeof(key_value);
|
||||
key.mv_data = &key_value;
|
||||
|
||||
Reference in New Issue
Block a user