All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhao Gongyi via ltp <ltp@lists.linux.it>
To: <ltp@lists.linux.it>
Subject: [LTP] [PATCH] syscalls/io_submit: Add TTERRNO/TERRNO when test fail
Date: Tue, 19 Apr 2022 16:50:02 +0800	[thread overview]
Message-ID: <20220419085002.65719-1-zhaogongyi@huawei.com> (raw)

Signed-off-by: Zhao Gongyi <zhaogongyi@huawei.com>
---
 testcases/kernel/syscalls/io_submit/io_submit01.c | 2 +-
 testcases/kernel/syscalls/io_submit/io_submit02.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/testcases/kernel/syscalls/io_submit/io_submit01.c b/testcases/kernel/syscalls/io_submit/io_submit01.c
index db541fc01..ba75f6d81 100644
--- a/testcases/kernel/syscalls/io_submit/io_submit01.c
+++ b/testcases/kernel/syscalls/io_submit/io_submit01.c
@@ -130,7 +130,7 @@ static void verify_io_submit(unsigned int n)
 		return;
 	}

-	tst_res(TFAIL, "io_submit() returned %i(%s), expected %s(%i)",
+	tst_res(TFAIL | TERRNO, "io_submit() returned %i(%s), expected %s(%i)",
 		ret, ret < 0 ? tst_strerrno(-ret) : "SUCCESS",
 		errno_name(t->exp_errno), t->exp_errno);
 }
diff --git a/testcases/kernel/syscalls/io_submit/io_submit02.c b/testcases/kernel/syscalls/io_submit/io_submit02.c
index 38b8555d8..6ba4d99a5 100644
--- a/testcases/kernel/syscalls/io_submit/io_submit02.c
+++ b/testcases/kernel/syscalls/io_submit/io_submit02.c
@@ -79,7 +79,7 @@ static void run(unsigned int i)
 	if (TST_RET == tc[i].nr)
 		tst_res(TPASS, "io_submit() %s", tc[i].desc);
 	else
-		tst_res(TFAIL, "io_submit() returns %ld, expected %ld", TST_RET, tc[i].nr);
+		tst_res(TFAIL | TTERRNO, "io_submit() returns %ld, expected %ld", TST_RET, tc[i].nr);

 	for (j = 0; j < TST_RET; j++) {
 		tst_syscall(__NR_io_getevents, *tc[i].ctx, 1, 1, &evbuf,
--
2.17.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

             reply	other threads:[~2022-04-19  8:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-19  8:50 Zhao Gongyi via ltp [this message]
2022-04-19 11:40 ` [LTP] [PATCH] syscalls/io_submit: Add TTERRNO/TERRNO when test fail Cyril Hrubis
2022-04-19 12:05 zhaogongyi via ltp
2022-04-19 13:14 ` Cyril Hrubis
2022-04-21 12:14 zhaogongyi via ltp

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=20220419085002.65719-1-zhaogongyi@huawei.com \
    --to=ltp@lists.linux.it \
    --cc=zhaogongyi@huawei.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.