coverage: fellow_cache_obj_slim()

parent 6ef38a04
......@@ -5506,11 +5506,13 @@ static void test_fellow_cache_obj_iter_final(
{
struct fellow_cache_res fcr;
struct fellow_cache_obj *fco;
struct fellow_cache_seg *fcs;
unsigned char h2[SHA256_LEN];
struct objcore *toc, ocmem[1];
VSHA256_CTX sha256ctx;
uintptr_t priv2;
unsigned u, refcnt;
struct fcscursor c;
int injcount;
INIT_OBJ(ocmem, OBJCORE_MAGIC);
......@@ -5532,6 +5534,16 @@ static void test_fellow_cache_obj_iter_final(
if (injcount == 0)
return;
fcsc_init(&c, &(*fcop)->seglist);
if ((fcs = FCSC_NEXT(&c)) != NULL) {
while (fcs->state == FCS_READING || fcs->state == FCS_WRITING)
usleep(100);
assert(fcs->state == FCS_INCORE);
AZ(fcs->refcnt);
} else
WRONG("no seg");
fellow_cache_obj_slim(fc, *fcop);
// remember object and deref
priv2 = (*fcop)->fdb.fdb;
refcnt = FCO_REFCNT(*fcop);
......
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