[LTP] [PATCH] syscalls/io_submit: Add TTERRNO/TERRNO when test fail

Zhao Gongyi zhaogongyi@huawei.com
Tue Apr 19 10:50:02 CEST 2022


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



More information about the ltp mailing list