Skip to content

Commit d4cab43

Browse files
committed
test/multicqes_drain: reset multi_cap between test_generic_drain calls
multi_cap is a global that caps the number of multishot SQEs per run. It gets decremented during SQE generation but was never reset between iterations, so calls 2-5 of test_generic_drain() could not generate any multishot SQEs (multi_cap <= 0 makes retry1 always true). With no multishot SQEs, cancel ops are also excluded (cnt stays 0), leaving only single and nop ops for those iterations. Reset multi_cap at the start of each call. Signed-off-by: Sebastian Chlad <sebastian.chlad@suse.com>
1 parent 6a31241 commit d4cab43

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

test/multicqes_drain.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ static int test_generic_drain(struct io_uring *ring)
189189
int i, j, ret, arg = 0;
190190
int pipes[max_entry][2];
191191
int pre_flags = 0;
192+
multi_cap = max_entry / 5;
192193

193194
for (i = 0; i < max_entry; i++) {
194195
if (pipe(pipes[i]) != 0) {

0 commit comments

Comments
 (0)