From: Jan Stancek <jstancek@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 2/5] syscalls/flock02: Rewrite to new library
Date: Thu, 2 Aug 2018 07:12:51 -0400 (EDT) [thread overview]
Message-ID: <1224365348.37572968.1533208371341.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <1533182024-18841-2-git-send-email-huangjh.jy@cn.fujitsu.com>
----- 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
next prev parent reply other threads:[~2018-08-02 11:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-02 3:53 [LTP] [PATCH 1/5] syscalls/flock01: Rewrite to new library Jinhui huang
2018-08-02 3:53 ` [LTP] [PATCH 2/5] syscalls/flock02: " Jinhui huang
2018-08-02 11:12 ` Jan Stancek [this message]
2018-08-02 3:53 ` [LTP] [PATCH 3/5] syscalls/flock03: " Jinhui huang
2018-08-02 11:20 ` Jan Stancek
2018-08-02 3:53 ` [LTP] [PATCH 4/5] syscalls/flock04: " Jinhui huang
2018-08-02 12:17 ` Jan Stancek
2018-08-06 5:07 ` [LTP] [PATCH v2 " Jinhui huang
2018-08-02 3:53 ` [LTP] [PATCH 5/5] syscalls/flock06: " Jinhui huang
2018-08-02 12:29 ` Jan Stancek
2018-08-06 5:08 ` [LTP] [PATCH v2 " Jinhui huang
2018-08-06 7:07 ` Jan Stancek
2018-08-02 11:03 ` [LTP] [PATCH 1/5] syscalls/flock01: " Jan Stancek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1224365348.37572968.1533208371341.JavaMail.zimbra@redhat.com \
--to=jstancek@redhat.com \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox