coverage: fellow_busy_body_seg_adjust()

parent e36c1ca6
......@@ -5950,6 +5950,8 @@ t_cache(unsigned chksum)
tune->ioerr_log = 1;
tune->allocerr_obj = 1;
tune->allocerr_log = 1;
// for coverage - hit cramming paths
tune->cram = -64;
AZ(stvfe_tune_check(tune));
buddy_init(membuddy, MIN_BUDDY_BITS, memsz,
......@@ -6053,7 +6055,7 @@ t_cache(unsigned chksum)
fbo = fellow_busy_obj_alloc(fc, &fco, &priv2, 1234).r.ptr;
CHECK_OBJ_NOTNULL(fbo, FELLOW_BUSY_MAGIC);
{
sz = 1234;
sz = dsksz;
AZ(fellow_busy_obj_getspace(fbo, &sz, (uint8_t **)&ptr).status);
}
test_bocdone(fbo, TRUST_ME(hash), 1);
......@@ -6088,6 +6090,24 @@ t_cache(unsigned chksum)
test_bocdone(fbo, TRUST_ME(hash), 1);
fellow_cache_obj_deref(fc, fco);
// === hit objsize_max with big chunks
fbo = fellow_busy_obj_alloc(fc, &fco, &priv2, 1234).r.ptr;
CHECK_OBJ_NOTNULL(fbo, FELLOW_BUSY_MAGIC);
do {
sz = dsksz;
fcr = fellow_busy_obj_getspace(fbo, &sz, (uint8_t **)&ptr);
if (fcr.status == fcr_ok) {
fellow_busy_obj_extend(fbo, sz);
continue;
}
assert(fcr.status == fcr_allocerr);
AZ(strcmp(fcr.r.err, "objsize_max reached"));
} while (fcr.status == fcr_ok);
fellow_busy_obj_trimstore(fbo);
test_bocdone(fbo, TRUST_ME(hash), 1);
fellow_cache_obj_deref(fc, fco);
// === hit objsize_max under memory pressure
fbo = fellow_busy_obj_alloc(fc, &fco, &priv2, 1234).r.ptr;
CHECK_OBJ_NOTNULL(fbo, FELLOW_BUSY_MAGIC);
......
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