All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH v2] syscalls/io_submit: Adapt TTERRNO/TERRNO when test fail
@ 2022-04-21 12:10 Zhao Gongyi via ltp
  2022-04-25 11:36 ` Cyril Hrubis
  0 siblings, 1 reply; 2+ messages in thread
From: Zhao Gongyi via ltp @ 2022-04-21 12:10 UTC (permalink / raw)
  To: ltp

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

diff --git a/testcases/kernel/syscalls/io_submit/io_submit01.c b/testcases/kernel/syscalls/io_submit/io_submit01.c
index db541fc01..616380b93 100644
--- a/testcases/kernel/syscalls/io_submit/io_submit01.c
+++ b/testcases/kernel/syscalls/io_submit/io_submit01.c
@@ -79,9 +79,11 @@ static void setup(void)
 {
 	TEST(io_setup(1, &ctx));
 	if (TST_RET == -ENOSYS)
-		tst_brk(TCONF | TRERRNO, "io_setup(): AIO not supported by kernel");
-	else if (TST_RET)
-		tst_brk(TBROK | TRERRNO, "io_setup() failed");
+		tst_brk(TCONF, "io_setup(): AIO not supported by kernel");
+	else if (TST_RET) {
+		tst_brk(TBROK, "io_setup() returned %ld(%s)",
+			TST_RET, tst_strerrno(-TST_RET));
+	}

 	io_prep_pread(&inv_fd_iocb, -1, buf, sizeof(buf), 0);

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [LTP] [PATCH v2] syscalls/io_submit: Adapt TTERRNO/TERRNO when test fail
  2022-04-21 12:10 [LTP] [PATCH v2] syscalls/io_submit: Adapt TTERRNO/TERRNO when test fail Zhao Gongyi via ltp
@ 2022-04-25 11:36 ` Cyril Hrubis
  0 siblings, 0 replies; 2+ messages in thread
From: Cyril Hrubis @ 2022-04-25 11:36 UTC (permalink / raw)
  To: Zhao Gongyi; +Cc: ltp

Hi!
Pushed, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-25 11:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-21 12:10 [LTP] [PATCH v2] syscalls/io_submit: Adapt TTERRNO/TERRNO when test fail Zhao Gongyi via ltp
2022-04-25 11:36 ` Cyril Hrubis

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.