diff mbox series

[liburing,1/1] test/io-cancel: expand print messages

Message ID 2a0a9eec0e5b7a69e63b705eb9fe3757f1bbd7d7.1721790601.git.asml.silence@gmail.com (mailing list archive)
State New
Headers show
Series [liburing,1/1] test/io-cancel: expand print messages | expand

Commit Message

Pavel Begunkov July 24, 2024, 11:10 a.m. UTC
Add at least some explanation on what it's printing.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
---
 test/io-cancel.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

Comments

Jens Axboe July 24, 2024, 1:58 p.m. UTC | #1
On Wed, 24 Jul 2024 12:10:35 +0100, Pavel Begunkov wrote:
> Add at least some explanation on what it's printing.
> 
> 

Applied, thanks!

[1/1] test/io-cancel: expand print messages
      commit: 6bf99f89d07f818101cc9305cb40c8c53d828a88

Best regards,
diff mbox series

Patch

diff --git a/test/io-cancel.c b/test/io-cancel.c
index 8dca2c3..adf31e7 100644
--- a/test/io-cancel.c
+++ b/test/io-cancel.c
@@ -347,18 +347,21 @@  static int test_cancel_req_across_fork(void)
 			case 1:
 				if (cqe->res != -EINTR &&
 				    cqe->res != -ECANCELED) {
-					fprintf(stderr, "%i %i\n", (int)cqe->user_data, cqe->res);
+					fprintf(stderr, "user_data %i res %i\n",
+						(unsigned)cqe->user_data, cqe->res);
 					exit(1);
 				}
 				break;
 			case 2:
 				if (cqe->res != -EALREADY && cqe->res) {
-					fprintf(stderr, "%i %i\n", (int)cqe->user_data, cqe->res);
+					fprintf(stderr, "user_data %i res %i\n",
+						(unsigned)cqe->user_data, cqe->res);
 					exit(1);
 				}
 				break;
 			default:
-				fprintf(stderr, "%i %i\n", (int)cqe->user_data, cqe->res);
+				fprintf(stderr, "user_data %i res %i\n",
+					(unsigned)cqe->user_data, cqe->res);
 				exit(1);
 			}
 
@@ -451,7 +454,8 @@  static int test_cancel_inflight_exit(void)
 		if ((cqe->user_data == 1 && cqe->res != -ECANCELED) ||
 		    (cqe->user_data == 2 && cqe->res != -ECANCELED) ||
 		    (cqe->user_data == 3 && cqe->res != -ETIME)) {
-			fprintf(stderr, "%i %i\n", (int)cqe->user_data, cqe->res);
+			fprintf(stderr, "user_data %i res %i\n",
+				(unsigned)cqe->user_data, cqe->res);
 			return 1;
 		}
 		io_uring_cqe_seen(&ring, cqe);