summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2021-01-21 06:05:01 -0700
committerJens Axboe <axboe@kernel.dk>2021-01-21 06:05:59 -0700
commitd24710922cdcdb0653c9f57bb8730aa113c6990b (patch)
treea7ac790af2ce7962ca700ee4119418aa49cdc302
parent2edfa3f84bcc44612b7a04caf1f048f5406fcc7a (diff)
downloadliburing-d24710922cdcdb0653c9f57bb8730aa113c6990b.tar.gz
liburing-d24710922cdcdb0653c9f57bb8730aa113c6990b.tar.bz2
test/self: skip if argument passed in
Also ignore -EOPNOTSUPP for now. Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--test/self.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/self.c b/test/self.c
index 8895781..422c9e3 100644
--- a/test/self.c
+++ b/test/self.c
@@ -54,6 +54,9 @@ int main(int argc, char *argv[])
char buf[64];
int ret;
+ if (argc > 1)
+ return 0;
+
ret = io_uring_queue_init(1, &ring, 0);
if (ret) {
fprintf(stderr, "ring setup failed\n");
@@ -62,6 +65,8 @@ int main(int argc, char *argv[])
ret = io_openat2(&ring, "/proc/self/comm", -1);
if (ret < 0) {
+ if (ret == -EOPNOTSUPP)
+ return 0;
if (ret == -EINVAL) {
fprintf(stdout, "openat2 not supported, skipping\n");
return 0;