From: Petr Vorel <pvorel@suse.cz>
To: Nikita Yushchenko <nikita.yushchenko@virtuozzo.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] nfs_flock: fail the test if lock/unlock ops fail
Date: Thu, 13 Jan 2022 18:21:08 +0100 [thread overview]
Message-ID: <YeBfgxRwzVbYCwLV@pevik> (raw)
In-Reply-To: <20220112161942.4065665-1-nikita.yushchenko@virtuozzo.com>
Hi Nikita,
[ Cc Alexey ]
> Since nfs_flock is testing locking operations, ignoring errors returned
> from those operations is nonsense.
Makes sense.
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Kind regards,
Petr
> Signed-off-by: Nikita Yushchenko <nikita.yushchenko@virtuozzo.com>
> ---
> testcases/network/nfs/nfslock01/nfs_flock.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
> diff --git a/testcases/network/nfs/nfslock01/nfs_flock.c b/testcases/network/nfs/nfslock01/nfs_flock.c
> index a7673c751..a13ddd251 100644
> --- a/testcases/network/nfs/nfslock01/nfs_flock.c
> +++ b/testcases/network/nfs/nfslock01/nfs_flock.c
> @@ -63,16 +63,20 @@ int main(int argc, char **argv)
> continue;
> }
> - if (writeb_lock(fd, offset, SEEK_SET, BYTES) < 0)
> - printf("failed in writeb_lock, Errno = %d", errno);
> + if (writeb_lock(fd, offset, SEEK_SET, BYTES) < 0) {
> + printf("failed in writeb_lock, Errno = %d\n", errno);
> + exit(1);
> + }
> lseek(fd, offset, SEEK_SET);
> /* write to the test file */
> write(fd, buf, BYTES);
> - if (unb_lock(fd, offset, SEEK_SET, BYTES) < 0)
> - printf("failed in unb_lock, Errno = %d", errno);
> + if (unb_lock(fd, offset, SEEK_SET, BYTES) < 0) {
> + printf("failed in unb_lock, Errno = %d\n", errno);
> + exit(1);
> + }
> }
> exit(0);
> }
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2022-01-13 17:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-12 16:19 [LTP] [PATCH] nfs_flock: fail the test if lock/unlock ops fail Nikita Yushchenko via ltp
2022-01-12 16:19 ` [LTP] [PATCH] nfs_lib.sh: run exportfs at "server side" in LTP_NETNS case Nikita Yushchenko via ltp
2022-01-13 15:50 ` Petr Vorel
2022-01-13 16:27 ` Nikita Yushchenko via ltp
2022-01-14 20:23 ` Petr Vorel
2022-01-14 21:29 ` Nikita Yushchenko via ltp
2022-01-13 17:21 ` Petr Vorel [this message]
2022-01-14 9:31 ` [LTP] [PATCH] nfs_flock: fail the test if lock/unlock ops fail Martin Doucha
2022-01-14 20:03 ` Petr Vorel
2023-04-29 19:28 ` Petr Vorel
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=YeBfgxRwzVbYCwLV@pevik \
--to=pvorel@suse.cz \
--cc=ltp@lists.linux.it \
--cc=nikita.yushchenko@virtuozzo.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.