From db05b4aa25edfaf6046b4e07ffec7726342a210a Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Tue, 26 Feb 2019 02:57:05 +0100 Subject: [PATCH] [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 --- harness/cases/21.t | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; -- 2.30.2