Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add missing persist in obj_tx_alloc_mt/TEST1 #5680

Merged
merged 3 commits into from
May 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions src/test/obj_tx_alloc_mt/obj_tx_alloc_mt.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,8 @@ static unsigned Threads;
static unsigned Ops_per_thread;
static unsigned Tx_per_thread;

struct action {
struct pobj_action pact;
os_mutex_t lock;
os_cond_t cond;
};

struct root {
uint64_t offs[MAX_THREADS][MAX_OPS_PER_THREAD];
struct action actions[MAX_THREADS][MAX_OPS_PER_THREAD];
};

struct worker_args {
PMEMobjpool *pop;
struct root *r;
unsigned idx;
};

Expand Down Expand Up @@ -167,21 +155,11 @@ main(int argc, char *argv[])
UT_FATAL("!pmemobj_open");
}

PMEMoid oid = pmemobj_root(pop, sizeof(struct root));
struct root *r = pmemobj_direct(oid);
UT_ASSERTne(r, NULL);

struct worker_args args[MAX_THREADS];

for (unsigned i = 0; i < Threads; ++i) {
args[i].pop = pop;
args[i].r = r;
args[i].idx = i;
for (unsigned j = 0; j < Ops_per_thread; ++j) {
struct action *a = &r->actions[i][j];
util_mutex_init(&a->lock);
util_cond_init(&a->cond);
}
}

/*
Expand Down