[LTP] [PATCH 2/5] syscalls/flock02: Rewrite to new library
Jan Stancek
jstancek@redhat.com
Thu Aug 2 13:12:51 CEST 2018
----- Original Message -----
> Signed-off-by: Jinhui huang <huangjh.jy@cn.fujitsu.com>
ACK, one note below.
> +static void verify_flock(unsigned n)
> +{
> + struct tcase *tc = &tcases[n];
>
> + fd = SAFE_OPEN("testfile", O_RDWR);
> + TEST(flock(*tc->fd, tc->operation));
> + if (TST_RET == 0) {
> + tst_res(TFAIL | TTERRNO, "flock() succeeded unexpectedly");
> + return;
You are not closing fd here, but we'll get many TFAILs before
we run out of open file descriptors. (no need to repost)
Regards,
Jan
More information about the ltp
mailing list