* [LTP] [PATCH] write04.c: use TST_EXP_FAIL() macro
@ 2022-07-14 16:05 Avinesh Kumar
2022-09-01 7:06 ` Petr Vorel
0 siblings, 1 reply; 2+ messages in thread
From: Avinesh Kumar @ 2022-07-14 16:05 UTC (permalink / raw)
To: ltp
Signed-off-by: Avinesh Kumar <akumar@suse.de>
---
testcases/kernel/syscalls/write/write04.c | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/testcases/kernel/syscalls/write/write04.c b/testcases/kernel/syscalls/write/write04.c
index a765d91b7..565fddfb7 100644
--- a/testcases/kernel/syscalls/write/write04.c
+++ b/testcases/kernel/syscalls/write/write04.c
@@ -30,20 +30,7 @@ static void verify_write(void)
{
char wbuf[8 * page_size];
- TEST(write(wfd, wbuf, sizeof(wbuf)));
-
- if (TST_RET != -1) {
- tst_res(TFAIL, "write() succeeded unexpectedly");
- return;
- }
-
- if (TST_ERR != EAGAIN) {
- tst_res(TFAIL | TTERRNO,
- "write() failed unexpectedly, expected EAGAIN");
- return;
- }
-
- tst_res(TPASS | TTERRNO, "write() failed expectedly");
+ TST_EXP_FAIL(write(wfd, wbuf, sizeof(wbuf)), EAGAIN);
}
static void setup(void)
--
2.36.1
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [LTP] [PATCH] write04.c: use TST_EXP_FAIL() macro
2022-07-14 16:05 [LTP] [PATCH] write04.c: use TST_EXP_FAIL() macro Avinesh Kumar
@ 2022-09-01 7:06 ` Petr Vorel
0 siblings, 0 replies; 2+ messages in thread
From: Petr Vorel @ 2022-09-01 7:06 UTC (permalink / raw)
To: Avinesh Kumar; +Cc: ltp
Hi Avinesh,
merged, thanks!
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-09-01 7:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-14 16:05 [LTP] [PATCH] write04.c: use TST_EXP_FAIL() macro Avinesh Kumar
2022-09-01 7:06 ` Petr Vorel
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.