* [LTP] [PATCH v2] syscalls/copy_file_range02: use .needs_tmpdir and MAX_LEN
@ 2019-08-23 8:07 Yang Xu
2019-08-26 9:21 ` Petr Vorel
0 siblings, 1 reply; 2+ messages in thread
From: Yang Xu @ 2019-08-23 8:07 UTC (permalink / raw)
To: ltp
Since commit bc514b22, we have removed EXDEV test. all_filesystem
,mount_device and mntpoint make no sense. Remove it and use tmpdir.
As man-page said, when we plan to write at a position past the maximum
allowed offset, it will return EFBIG. We should USE tst_max_lfs_filesize
as dst instead of (tst_max_lfs_fileszie - MIN_OFF). Also, it doesn't affect
EOVERFLOW.
Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
Signed-off-by: Murphy Zhou <jencce.kernel@gmail.com>
---
.../kernel/syscalls/copy_file_range/copy_file_range02.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/testcases/kernel/syscalls/copy_file_range/copy_file_range02.c b/testcases/kernel/syscalls/copy_file_range/copy_file_range02.c
index a08df9bdb..d6e843ee4 100644
--- a/testcases/kernel/syscalls/copy_file_range/copy_file_range02.c
+++ b/testcases/kernel/syscalls/copy_file_range/copy_file_range02.c
@@ -115,7 +115,7 @@ static void verify_copy_file_range(unsigned int n)
}
if (tc->copy_to_fd == &fd_copy)
- dst = tst_max_lfs_filesize() - MIN_OFF;
+ dst = tst_max_lfs_filesize();
TEST(sys_copy_file_range(fd_src, 0, *tc->copy_to_fd,
&dst, tc->len, tc->flags));
@@ -224,8 +224,6 @@ static struct tst_test test = {
.setup = setup,
.cleanup = cleanup,
.needs_root = 1,
- .mount_device = 1,
- .mntpoint = MNTPOINT,
- .all_filesystems = 1,
+ .needs_tmpdir = 1,
.test_variants = TEST_VARIANTS,
};
--
2.18.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* [LTP] [PATCH v2] syscalls/copy_file_range02: use .needs_tmpdir and MAX_LEN
2019-08-23 8:07 [LTP] [PATCH v2] syscalls/copy_file_range02: use .needs_tmpdir and MAX_LEN Yang Xu
@ 2019-08-26 9:21 ` Petr Vorel
0 siblings, 0 replies; 2+ messages in thread
From: Petr Vorel @ 2019-08-26 9:21 UTC (permalink / raw)
To: ltp
Hi all,
> Since commit bc514b22, we have removed EXDEV test. all_filesystem
> ,mount_device and mntpoint make no sense. Remove it and use tmpdir.
> As man-page said, when we plan to write at a position past the maximum
> allowed offset, it will return EFBIG. We should USE tst_max_lfs_filesize
> as dst instead of (tst_max_lfs_fileszie - MIN_OFF). Also, it doesn't affect
> EOVERFLOW.
> Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
> Signed-off-by: Murphy Zhou <jencce.kernel@gmail.com>
Thanks for the fix. I tempted to split these 2 changes into 2 commits,
but in the end kept it in single commit.
Merged (with adjusted commit message and
Reported-by for Murphy Zhou and Signed-off-by for Li as he did a review for
previous version).
Kind regards,
Petr
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-08-26 9:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-23 8:07 [LTP] [PATCH v2] syscalls/copy_file_range02: use .needs_tmpdir and MAX_LEN Yang Xu
2019-08-26 9:21 ` Petr Vorel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox