From: Petr Vorel <pvorel@suse.cz>
To: Samasth Norway Ananda <samasth.norway.ananda@oracle.com>
Cc: calum.mackay@oracle.com, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2] mremap06: fallocate is not supported on nfsv4.1 or earlier
Date: Fri, 12 Apr 2024 08:22:56 +0200 [thread overview]
Message-ID: <20240412062256.GA384221@pevik> (raw)
In-Reply-To: <20240412052632.1787731-1-samasth.norway.ananda@oracle.com>
Hi all,
> The function fallocate() is only supported over NFSv4.2. Thus when we
> run the mremap06 ltp test over an NFSv4.1 or earlier filesystem the test
> fails.
> Signed-off-by: Samasth Norway Ananda <samasth.norway.ananda@oracle.com>
> ---
> testcases/kernel/syscalls/mremap/mremap06.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
> diff --git a/testcases/kernel/syscalls/mremap/mremap06.c b/testcases/kernel/syscalls/mremap/mremap06.c
> index 3bbaf441a..f3df0551c 100644
> --- a/testcases/kernel/syscalls/mremap/mremap06.c
> +++ b/testcases/kernel/syscalls/mremap/mremap06.c
> @@ -104,8 +104,13 @@ static void setup(void)
> fd = SAFE_OPEN("testfile", O_CREAT | O_RDWR | O_TRUNC, 0600);
> ret = fallocate(fd, 0, 0, mmap_size);
> - if (ret == -1)
> + if (ret != 0) {
> + if (tst_fs_type(".") == TST_NFS_MAGIC && (errno == EOPNOTSUPP || errno == ENOSYS)) {
> + tst_brk(TCONF,
> + "fallocate system call is not implemented");
> + }
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Thanks!
NOTE: I'll amend the code formatting before merge:
if (tst_fs_type(".") == TST_NFS_MAGIC && (errno == EOPNOTSUPP ||
errno == ENOSYS)) {
tst_brk(TCONF, "fallocate system call is not implemented");
}
And prepare following patch which adds safe_fallocate() in the library.
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2024-04-12 6:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-12 5:26 [LTP] [PATCH v2] mremap06: fallocate is not supported on nfsv4.1 or earlier Samasth Norway Ananda via ltp
2024-04-12 6:22 ` Petr Vorel [this message]
2024-04-12 7:33 ` Cyril Hrubis
2024-04-12 9:16 ` 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=20240412062256.GA384221@pevik \
--to=pvorel@suse.cz \
--cc=calum.mackay@oracle.com \
--cc=ltp@lists.linux.it \
--cc=samasth.norway.ananda@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox