dup204.c: use TST_EXP_VAL() and TST_EXP_EQ_LU() macros
PATCH 1/1 dup204.c: use TST_EXP_VAL() and TST_EXP_EQ_LU() macros
Signed-off-by Avinesh Kumar <[email protected]>
--- testcases/kernel/syscalls/dup2/dup204.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-)
testcases/kernel/syscalls/dup2/dup204.c +3 -12
@@ -35,23 +35,14 @@ static void run(unsigned int i) {struct stat oldbuf, newbuf; -TEST (dup2 (fd[i], nfd[i])); -if (TST_RET ==-1 ) { -tst_res (TFAIL ,"call failed unexpectedly" ); +TST_EXP_VAL (dup2 (fd[i], nfd[i]), nfd[i]); +if (TST_RET ==-1 )return ; - }SAFE_FSTAT (fd[i], &oldbuf);SAFE_FSTAT (nfd[i], &newbuf); -if (oldbuf.st_ino != newbuf.st_ino) -tst_res (TFAIL , -"original inode(%ld) and duped inode(%ld) do not match" , - oldbuf.st_ino, newbuf.st_ino); -else -tst_res (TPASS , -"original inode(%ld) and duped inode(%ld) are the same" , - oldbuf.st_ino, newbuf.st_ino); +TST_EXP_EQ_LU (oldbuf.st_ino, newbuf.st_ino);SAFE_CLOSE (TST_RET ); }
Signature · 5 lines
2.36.1 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Petr Vorel
AppliedHi Avinesh,
merged, thanks!
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp