All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] syscalls/copy_file_range02: use .needs_tmpdir and MAX_LEN
@ 2019-08-23  6:22 Yang Xu
  2019-08-23  6:55 ` Li Wang
  2019-08-23  7:15 ` Murphy Zhou
  0 siblings, 2 replies; 6+ messages in thread
From: Yang Xu @ 2019-08-23  6:22 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. So we should USE MAX_LEN as pos
instead of MAX_OFF.

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 9004c4a40..f502c75c0 100644
--- a/testcases/kernel/syscalls/copy_file_range/copy_file_range02.c
+++ b/testcases/kernel/syscalls/copy_file_range/copy_file_range02.c
@@ -74,7 +74,7 @@ static struct tcase {
 	{&fd_chrdev,    0,   EINVAL,     0,     CONTSIZE, "char device"},
 	{&fd_fifo,      0,   EINVAL,     0,     CONTSIZE, "fifo"},
 	{&fd_copy,      0,   EOVERFLOW,  MAX_OFF, ULLONG_MAX, "max length lenght"},
-	{&fd_copy,      0,   EFBIG,      MAX_OFF, MIN_OFF, "max file size"},
+	{&fd_copy,      0,   EFBIG,      MAX_LEN, MIN_OFF, "max file size"},
 };
 
 static int run_command(char *command, char *option, char *file)
@@ -219,8 +219,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] 6+ messages in thread

end of thread, other threads:[~2019-08-23  7:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-23  6:22 [LTP] [PATCH] syscalls/copy_file_range02: use .needs_tmpdir and MAX_LEN Yang Xu
2019-08-23  6:55 ` Li Wang
2019-08-23  7:13   ` Yang Xu
2019-08-23  7:24     ` Li Wang
2019-08-23  7:29       ` Yang Xu
2019-08-23  7:15 ` Murphy Zhou

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.