test/send_recvmsg.c: only check buffer group ID if set
This test assumes that the only valid flag being set for a send/recv
is IORING_CQE_F_BUFFER. But that isn't necessarily true, so check
specifically for whether this is a provided buffer return before checking
the buffer group ID.
@@ -112,7 +112,7 @@ static int do_recvmsg(struct io_uring *ring, char buf[MAX_MSG + 1],
fprintf(stderr, "%s: failed cqe: %d\n", __FUNCTION__, cqe->res);
goto err;
}
- if (cqe->flags) {
+ if (cqe->flags & IORING_CQE_F_BUFFER) {
int bid = cqe->flags >> 16;
if (bid != BUF_BID)
fprintf(stderr, "Buffer ID mismatch %d\n", bid);
