@@ -61,7 +61,7 @@ int main(int argc, char *argv[])
if (!ret) {
if (cqe->res == -EBADF || cqe->res == -EINVAL) {
fprintf(stdout, "Accept not supported, skipping\n");
- goto out;
+ goto skip;
} else if (cqe->res < 0) {
fprintf(stderr, "cqe error %d\n", cqe->res);
goto err;
@@ -71,9 +71,12 @@ int main(int argc, char *argv[])
return T_EXIT_FAIL;
}
-out:
io_uring_queue_exit(&ring);
return T_EXIT_PASS;
+
+skip:
+ io_uring_queue_exit(&ring);
+ return T_EXIT_SKIP;
err:
io_uring_queue_exit(&ring);
return T_EXIT_FAIL;
@@ -67,14 +67,15 @@ static int test_fallocate_rlimit(struct io_uring *ring)
if (cqe->res == -EINVAL) {
fprintf(stdout, "Fallocate not supported, skipping\n");
no_fallocate = 1;
- goto out;
+ goto skip;
} else if (cqe->res != -EFBIG) {
fprintf(stderr, "Expected -EFBIG: %d\n", cqe->res);
goto err;
}
io_uring_cqe_seen(ring, cqe);
-out:
return 0;
+skip:
+ return T_EXIT_SKIP;
err:
return 1;
}
@@ -117,7 +118,7 @@ static int test_fallocate(struct io_uring *ring)
if (cqe->res == -EINVAL) {
fprintf(stdout, "Fallocate not supported, skipping\n");
no_fallocate = 1;
- goto out;
+ goto skip;
}
if (cqe->res) {
fprintf(stderr, "cqe->res=%d\n", cqe->res);
@@ -136,8 +137,9 @@ static int test_fallocate(struct io_uring *ring)
goto err;
}
-out:
return 0;
+skip:
+ return T_EXIT_SKIP;
err:
return 1;
}
@@ -93,7 +93,7 @@ int main(int argc, char *argv[])
}
if (i == 99) {
printf("Gave up on finding a port, skipping\n");
- goto out;
+ goto skip;
}
}
@@ -123,7 +123,9 @@ int main(int argc, char *argv[])
return T_EXIT_FAIL;
}
-out:
io_uring_queue_exit(&ring);
return T_EXIT_PASS;
+skip:
+ io_uring_queue_exit(&ring);
+ return T_EXIT_SKIP;
}
@@ -99,7 +99,7 @@ int main(int argc, char *argv[])
}
if (i == 99) {
printf("Gave up on finding a port, skipping\n");
- goto out;
+ goto skip;
}
}
@@ -129,7 +129,9 @@ int main(int argc, char *argv[])
return T_EXIT_FAIL;
}
-out:
io_uring_queue_exit(&ring);
return T_EXIT_PASS;
+skip:
+ io_uring_queue_exit(&ring);
+ return T_EXIT_SKIP;
}
@@ -98,7 +98,7 @@ int main(int argc, char *argv[])
if (ret < 0) {
if (ret == -EBADF || ret == -EINVAL) {
fprintf(stdout, "linkat not supported, skipping\n");
- goto out;
+ goto skip;
}
fprintf(stderr, "linkat: %s\n", strerror(-ret));
goto err1;
@@ -121,7 +121,11 @@ int main(int argc, char *argv[])
goto err2;
}
-out:
+ unlinkat(AT_FDCWD, linkname, 0);
+ unlinkat(AT_FDCWD, target, 0);
+ io_uring_queue_exit(&ring);
+ return T_EXIT_SKIP;
+skip:
unlinkat(AT_FDCWD, linkname, 0);
unlinkat(AT_FDCWD, target, 0);
io_uring_queue_exit(&ring);
@@ -134,4 +138,3 @@ err:
io_uring_queue_exit(&ring);
return T_EXIT_FAIL;
}
-
We cannot use the general cleanup-and-succeed here. These were improperly ported to the exitcode reporting. Signed-off-by: Eli Schwartz <eschwartz93@gmail.com> --- test/accept-test.c | 7 +++++-- test/fallocate.c | 10 ++++++---- test/files-exit-hang-poll.c | 6 ++++-- test/files-exit-hang-timeout.c | 6 ++++-- test/hardlink.c | 9 ++++++--- 5 files changed, 25 insertions(+), 13 deletions(-)