@@ -97,21 +97,8 @@ void verify_accept(unsigned int nr)
{
struct test_case *tcase = &tcases[nr];
- TEST(accept(*tcase->fd, tcase->sockaddr, &tcase->salen));
-
- if (TST_RET != -1) {
- tst_res(TFAIL, "%s: returned %li, expected -1",
- tcase->desc, TST_RET);
- return;
- }
-
- if (TST_ERR != tcase->experrno) {
- tst_res(TFAIL | TTERRNO, "%s: expected errno %s, got ",
- tcase->desc, tst_strerrno(tcase->experrno));
- return;
- }
-
- tst_res(TPASS | TTERRNO, "%s successful", tcase->desc);
+ TST_EXP_FAIL(accept(*tcase->fd, tcase->sockaddr, &tcase->salen),
+ tcase->experrno, "%s", tcase->desc);
}
static struct tst_test test = {
Signed-off-by: Cyril Hrubis <chrubis@suse.cz> --- testcases/kernel/syscalls/accept/accept01.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-)