Rarely, the request we're trying to cancel may not yet got picked by
a worker, and so the cancel request returns 0 instead of -EALREADY, and
it's a valid output we should consider.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
---
test/io-cancel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/io-cancel.c b/test/io-cancel.c
index 9a36dd9..a4cc361 100644
--- a/test/io-cancel.c
+++ b/test/io-cancel.c
@@ -339,7 +339,7 @@ static int test_cancel_req_across_fork(void)
return 1;
}
if ((cqe->user_data == 1 && cqe->res != -EINTR) ||
- (cqe->user_data == 2 && cqe->res != -EALREADY)) {
+ (cqe->user_data == 2 && cqe->res != -EALREADY && cqe->res)) {
fprintf(stderr, "%i %i\n", (int)cqe->user_data, cqe->res);
exit(1);
}--
2.32.0