From: Guillem Jover Date: Tue, 26 Feb 2019 01:57:05 +0000 (+0100) Subject: [PATCH 5/7] harness: Handle -ENOTSUP from io_submit() with RWF_NOWAIT X-Git-Tag: archive/raspbian/0.3.112-13+rpi1~1^2^2^2~17 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=db05b4aa25edfaf6046b4e07ffec7726342a210a;p=libaio.git [PATCH 5/7] harness: Handle -ENOTSUP from io_submit() with RWF_NOWAIT On filesystems such as tmpfs the syscall might return -ENOTSUP instead of EINVAL when it does not support the RWF_NOWAIT flag. Signed-off-by: Guillem Jover Gbp-Pq: Name 0005-harness-Handle-ENOTSUP-from-io_submit-with-RWF_NOWAI.patch --- diff --git a/harness/cases/21.t b/harness/cases/21.t index 352bf88..52206be 100644 --- a/harness/cases/21.t +++ b/harness/cases/21.t @@ -105,10 +105,11 @@ test_main() ret = io_submit(ctx, 1, &iocbp); /* - * io_submit will return -EINVAL if RWF_NOWAIT is not supported. + * io_submit will return -EINVAL or -ENOTSUP if RWF_NOWAIT is not + * supported. */ if (ret != 1) { - if (ret == -EINVAL) { + if (ret == -EINVAL || ret == -ENOTSUP) { fprintf(stderr, "RWF_NOWAIT not supported by kernel.\n"); /* just return success */ return 0;