public inbox for [email protected]
 help / color / mirror / Atom feed
From: Pavel Begunkov <[email protected]>
To: Jens Axboe <[email protected]>, [email protected]
Subject: [PATCH liburing 1/3] test/rw: name flags for clearness
Date: Sun,  6 Dec 2020 12:51:21 +0000	[thread overview]
Message-ID: <d90c51d04ad52c887f1a2c06be93d99129423999.1607258973.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>

Replace obscure v1-v6 with more readable flag names.

Signed-off-by: Pavel Begunkov <[email protected]>
---
 test/read-write.c | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/test/read-write.c b/test/read-write.c
index 3bea26f..d47bebb 100644
--- a/test/read-write.c
+++ b/test/read-write.c
@@ -696,18 +696,19 @@ int main(int argc, char *argv[])
 		nr = 32;
 
 	for (i = 0; i < nr; i++) {
-		int v1, v2, v3, v4, v5, v6;
-
-		v1 = (i & 1) != 0;
-		v2 = (i & 2) != 0;
-		v3 = (i & 4) != 0;
-		v4 = (i & 8) != 0;
-		v5 = (i & 16) != 0;
-		v6 = (i & 32) != 0;
-		ret = test_io(fname, v1, v2, v3, v4, v5, v6);
+		int write = (i & 1) != 0;
+		int buffered = (i & 2) != 0;
+		int sqthread = (i & 4) != 0;
+		int fixed = (i & 8) != 0;
+		int mixed_fixed = (i & 16) != 0;
+		int nonvec = (i & 32) != 0;
+
+		ret = test_io(fname, write, buffered, sqthread, fixed,
+			      mixed_fixed, nonvec);
 		if (ret) {
 			fprintf(stderr, "test_io failed %d/%d/%d/%d/%d/%d\n",
-					v1, v2, v3, v4, v5, v6);
+					write, buffered, sqthread, fixed,
+					mixed_fixed, nonvec);
 			goto err;
 		}
 	}
-- 
2.24.0


  reply	other threads:[~2020-12-06 12:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-06 12:51 [PATCH liburing 0/3] test reg buffers more Pavel Begunkov
2020-12-06 12:51 ` Pavel Begunkov [this message]
2020-12-06 12:51 ` [PATCH liburing 2/3] test/rw: remove not used mixed_fixed flag Pavel Begunkov
2020-12-06 12:51 ` [PATCH liburing 3/3] test/rw: test reg bufs with non-align sizes/offset Pavel Begunkov
2020-12-07 15:49 ` [PATCH liburing 0/3] test reg buffers more 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 \
    --in-reply-to=d90c51d04ad52c887f1a2c06be93d99129423999.1607258973.git.asml.silence@gmail.com \
    [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