[LTP] [PATCH 1/5] dup01.c: use TST_EXP_FD macro and add inode check
Petr Vorel
pvorel@suse.cz
Tue May 2 13:18:13 CEST 2023
Hi Avinesh,
> ---
> testcases/kernel/syscalls/dup/dup01.c | 25 +++++++++++++++----------
...
> static void verify_dup(void)
> {
> + TST_EXP_FD(dup(fd), "dup(%d)", fd);
IMHO only this is enough:
TST_EXP_FD(dup(fd));
Kind regards,
Petr
> +
> + SAFE_FSTAT(TST_RET, &buf2);
> + TST_EXP_EQ_LU(buf1.st_ino, buf2.st_ino);
> +
> + SAFE_CLOSE(TST_RET);
> }
More information about the ltp
mailing list