public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Jan Stancek <jstancek@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 5/5] syscalls/flock06: Rewrite to new library
Date: Thu, 2 Aug 2018 08:29:24 -0400 (EDT)	[thread overview]
Message-ID: <1649896669.37585897.1533212964490.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <1533182024-18841-5-git-send-email-huangjh.jy@cn.fujitsu.com>


----- Original Message -----
> Signed-off-by: Jinhui huang <huangjh.jy@cn.fujitsu.com>
> ---
>  testcases/kernel/syscalls/flock/flock06.c | 213
>  ++++++++----------------------
>  1 file changed, 52 insertions(+), 161 deletions(-)

Hi,

> +	int fd1, fd2;
> +
> +	fd1 = SAFE_OPEN("testfile", O_RDWR);
> +	TEST(flock(fd1, LOCK_EX | LOCK_NB));
> +	if (TST_RET != 0)
> +		tst_res(TFAIL | TTERRNO, "First attempt to flock() failed");
> +	else
> +		tst_res(TPASS, "First attempt to flock() passed");
> +
> +	fd2 = SAFE_OPEN("testfile", O_RDWR);
> +	TEST(flock(fd2, LOCK_EX | LOCK_NB));
> +	if (TST_RET != 1)

This should be == -1
The rest looks good to me.

Regards,
Jan

  reply	other threads:[~2018-08-02 12:29 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
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 [this message]
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=1649896669.37585897.1533212964490.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