Skip to content

Commit

Permalink
Merge pull request #5680 from grom72/test-fix-5660
Browse files Browse the repository at this point in the history
test: add missing persist in obj_tx_alloc_mt/TEST1
  • Loading branch information
janekmi committed May 23, 2023
2 parents 251b6be + 5bed7f5 commit c5707df
Showing 1 changed file with 0 additions and 22 deletions.
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

0 comments on commit c5707df

Please sign in to comment.