[PATCH libaio 24/28] harness: skip 22.p if async_poll isn't supported
authorJeff Moyer <jmoyer@redhat.com>
Mon, 29 Jul 2019 18:25:01 +0000 (14:25 -0400)
committerGuillem Jover <guillem@debian.org>
Tue, 2 Nov 2021 23:56:45 +0000 (23:56 +0000)
Use the new skip error code instead of failing the test.  Also
add in a Local variables: section for emacs.

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Gbp-Pq: Topic upstream
Gbp-Pq: Name 0024-harness-skip-22.p-if-async_poll-isn-t-supported.patch

harness/cases/22.t

index c7428a89a8d1004358e8561106e848868e2e1af6..b13024e06a99b11a1be1f6ac5110208ebf9d93b4 100644 (file)
@@ -83,6 +83,9 @@ int test_main(void)
                io_prep_poll(&iocb, pipe1[0], POLLIN);
                ret = io_submit(ctx, 1, iocbs);
                if (ret != 1) {
+                       /* if poll isn't supported, skip the test */
+                       if (ret == -EINVAL)
+                               return 3;
                        printf("child: io_submit failed\n");
                        return 1;
                }
@@ -120,7 +123,10 @@ int test_main(void)
 
                ret = io_submit(ctx, 1, iocbs);
                if (ret != 1) {
-                       printf("parent: io_submit failed\n");
+                       /* if poll isn't supported, skip the test */
+                       if (ret == -EINVAL)
+                               return 3;
+                       printf("parent: io_submit failed with %d\n", ret);
                        return 1;
                }
 
@@ -147,3 +153,9 @@ int test_main(void)
                return 0;
        }
 }
+/*
+ * Local variables:
+ *  mode: c
+ *  c-basic-offset: 8
+ * End:
+ */