fellow_cache_test: extend t_budyobj for varying ldsegs

parent 87362008
......@@ -7012,7 +7012,7 @@ t_lcb(struct fellow_cache *fc)
#define PP(x) (void *)(uintptr_t)(x)
// test concurrent iter while filling object
static void
t_busyobj(unsigned chksum, struct fellow_cache *fc)
t_busyobj(unsigned chksum, struct fellow_cache *fc, uint16_t limit_ldsegs)
{
unsigned char h1[SHA256_LEN], h2[SHA256_LEN];
struct fellow_cache_obj *fco;
......@@ -7049,7 +7049,7 @@ t_busyobj(unsigned chksum, struct fellow_cache *fc)
DBG("concurrent test_iter thread %p", PP(iter_thr->thr));
u = fco->fcsl->fdsl->lsegs + 72 * 2;
XXX_LIMIT_LDSEGS = 1;
XXX_LIMIT_LDSEGS = limit_ldsegs;
while (u-- > 0) {
void *p;
sz = 1234;
......@@ -7361,7 +7361,7 @@ t_cache(const char *fn, unsigned chksum)
test_fellow_cache_unbusy_inject(fc);
for (u = 0; u < 100; u++)
t_busyobj(chksum, fc);
t_busyobj(chksum, fc, u);
// === alloc, then evict
VSHA256_Init(&sha256ctx);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment