ipc/msgctl04: Make use of TST_EXP_FAIL()
PATCH 1/1 ipc/msgctl04: Make use of TST_EXP_FAIL()
In order to simplify the code a bit.
Signed-off-by Cyril Hrubis <[email protected]>
--- .../kernel/syscalls/ipc/msgctl/msgctl04.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-)
testcases/kernel/syscalls/ipc/msgctl/msgctl04.c +4 -15
@@ -76,21 +76,10 @@ static void verify_msgctl(unsigned int i)return ; } -TEST (tv->msgctl (*(tc[i].msg_id), tc[i].cmd, tc[i].buf)); - -if (TST_RET !=-1 ) { -tst_res (TFAIL ,"msgctl() returned %li" ,TST_RET ); -return ; - } - -if (TST_ERR == tc[i].error) { -tst_res (TPASS |TTERRNO ,"msgctl(%i, %i, %p)" , - *tc[i].msg_id, tc[i].cmd, tc[i].buf); -return ; - } - -tst_res (TFAIL |TTERRNO ,"msgctl(%i, %i, %p) expected %s" , - *tc[i].msg_id, tc[i].cmd, tc[i].buf,tst_strerrno (tc[i].error)); +TST_EXP_FAIL (tv->msgctl (*(tc[i].msg_id), tc[i].cmd, tc[i].buf), + tc[i].error, +"msgctl(%i, %i, %p)" , + *(tc[i].msg_id), tc[i].cmd, tc[i].buf); }static void setup (void )
Signature · 1 line
2.31.1