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

* [LTP] [PATCH] syscalls/copy_file_range02: use .needs_tmpdir and MAX_LEN
  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:15 ` Murphy Zhou
  1 sibling, 1 reply; 6+ messages in thread
From: Li Wang @ 2019-08-23  6:55 UTC (permalink / raw)
  To: ltp

Hi Xu,

Seems you have to apply Petr's patch first, then do a new
modification. Because that patch fixes another compiling issue.

[1] http://lists.linux.it/pipermail/ltp/2019-August/013239.html

--
Regards,
Li Wang

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [LTP] [PATCH] syscalls/copy_file_range02: use .needs_tmpdir and MAX_LEN
  2019-08-23  6:55 ` Li Wang
@ 2019-08-23  7:13   ` Yang Xu
  2019-08-23  7:24     ` Li Wang
  0 siblings, 1 reply; 6+ messages in thread
From: Yang Xu @ 2019-08-23  7:13 UTC (permalink / raw)
  To: ltp

On 2019/08/23 14:55, Li Wang wrote:
> Hi Xu,
>
> Seems you have to apply Petr's patch first, then do a new
> modification. Because that patch fixes another compiling issue.
>
> [1] http://lists.linux.it/pipermail/ltp/2019-August/013239.html
Hi Li


Petr' patch looks ok but I don't know why it isn't merged on master branch.

I am not sure Petr's patch whether having the next version, so I don't rebase it.

IMO, merge Petr's patch then I rebase it. Or Merge my patch then Petr rebases it.
It depends on ltp community.


Thanks
Yang Xu

> --
> Regards,
> Li Wang
>
>
>




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [LTP] [PATCH] syscalls/copy_file_range02: use .needs_tmpdir and MAX_LEN
  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:15 ` Murphy Zhou
  1 sibling, 0 replies; 6+ messages in thread
From: Murphy Zhou @ 2019-08-23  7:15 UTC (permalink / raw)
  To: ltp

On Fri, Aug 23, 2019 at 02:22:54PM +0800, Yang Xu wrote:
> 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.

Test PASS. Thanks!

> 
> 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	[flat|nested] 6+ messages in thread

* [LTP] [PATCH] syscalls/copy_file_range02: use .needs_tmpdir and MAX_LEN
  2019-08-23  7:13   ` Yang Xu
@ 2019-08-23  7:24     ` Li Wang
  2019-08-23  7:29       ` Yang Xu
  0 siblings, 1 reply; 6+ messages in thread
From: Li Wang @ 2019-08-23  7:24 UTC (permalink / raw)
  To: ltp

Hi Xu,

> Petr' patch looks ok but I don't know why it isn't merged on master branch.

Sorry for the delay, I have just merged that one.

-- 
Regards,
Li Wang

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [LTP] [PATCH] syscalls/copy_file_range02: use .needs_tmpdir and MAX_LEN
  2019-08-23  7:24     ` Li Wang
@ 2019-08-23  7:29       ` Yang Xu
  0 siblings, 0 replies; 6+ messages in thread
From: Yang Xu @ 2019-08-23  7:29 UTC (permalink / raw)
  To: ltp

On 2019/08/23 15:24, Li Wang wrote:

> Hi Xu,
>
>> Petr' patch looks ok but I don't know why it isn't merged on master branch.
> Sorry for the delay, I have just merged that one.
>
OK.  I will send a v2 patch.




^ permalink raw reply	[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.