public inbox for [email protected]
 help / color / mirror / Atom feed
From: Eli Schwartz <[email protected]>
To: [email protected]
Subject: [PATCH liburing 5/6] tests: migrate a skip that used a goto to enter cleanup
Date: Tue,  5 Jul 2022 23:40:57 -0400	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

We cannot use the general cleanup-and-succeed here. Migrate this to use
exitcode reporting via a new "skip" goto.

Signed-off-by: Eli Schwartz <[email protected]>
---
 test/mkdir.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/test/mkdir.c b/test/mkdir.c
index 6b3497c..0a6d16f 100644
--- a/test/mkdir.c
+++ b/test/mkdir.c
@@ -72,7 +72,7 @@ int main(int argc, char *argv[])
 	if (ret < 0) {
 		if (ret == -EBADF || ret == -EINVAL) {
 			fprintf(stdout, "mkdirat not supported, skipping\n");
-			goto out;
+			goto skip;
 		}
 		fprintf(stderr, "mkdirat: %s\n", strerror(-ret));
 		goto err;
@@ -97,10 +97,13 @@ int main(int argc, char *argv[])
 		goto err1;
 	}
 
-out:
 	unlinkat(AT_FDCWD, fn, AT_REMOVEDIR);
 	io_uring_queue_exit(&ring);
-	return 0;
+	return T_EXIT_PASS;
+skip:
+	unlinkat(AT_FDCWD, fn, AT_REMOVEDIR);
+	io_uring_queue_exit(&ring);
+	return T_EXIT_SKIP;
 err1:
 	unlinkat(AT_FDCWD, fn, AT_REMOVEDIR);
 err:
-- 
2.35.1



  parent reply	other threads:[~2022-07-06  3:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-06  3:40 [PATCH liburing 0/6] More wor on updating exit codes to use Eli Schwartz
2022-07-06  3:40 ` [PATCH liburing 1/6] tests: do not report an error message when return ret that might be a skip Eli Schwartz
2022-07-06  3:40 ` [PATCH liburing 2/6] tests: handle some skips that used a goto to enter cleanup Eli Schwartz
2022-07-06  3:40 ` [PATCH liburing 3/6] tests: more work on updating exit codes to use enum-based status reporting Eli Schwartz
2022-07-06  3:40 ` [PATCH liburing 4/6] tests: mention in a status message that this is a skip Eli Schwartz
2022-07-06  3:40 ` Eli Schwartz [this message]
2022-07-06  3:40 ` [PATCH liburing 6/6] tests: correctly exit with failure in a looped test Eli Schwartz
2022-07-06 12:45 ` [PATCH liburing 0/6] More wor on updating exit codes to use Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox