test/splice: fix-up test case on kernels not supporting splice

Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/test/splice.c b/test/splice.c
index cdaaf2f..8a7878b 100644
--- a/test/splice.c
+++ b/test/splice.c
@@ -39,7 +39,13 @@
 			     len, flags2);
 
 	ret = io_uring_submit(ring);
-	if (ret < 1) {
+	if (ret < 2) {
+		/* submitted just one, kernel likely doesn't support splice */
+		if (!io_uring_peek_cqe(ring, &cqe) &&
+		    cqe->res == -EINVAL) {
+			no_splice = 1;
+			return -1;
+		}
 		fprintf(stderr, "sqe submit failed: %d\n", ret);
 		return -1;
 	}