From: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2] syscalls/copy_file_range02: increase coverage and remove EXDEV test
Date: Wed, 10 Jul 2019 15:32:15 +0800 [thread overview]
Message-ID: <5D25947F.8000700@cn.fujitsu.com> (raw)
In-Reply-To: <CAOQ4uxhjbaszcCL0=QAncBT3PzqJR_7oyR+_0-zNa-pt6JNQSA@mail.gmail.com>
on 2019/07/09 18:06, Amir Goldstein wrote:
> On Tue, Jul 9, 2019 at 9:57 AM Yang Xu<xuyang2018.jy@cn.fujitsu.com> wrote:
>> on 2019/07/08 23:17, Amir Goldstein wrote:
>>
>>> On Mon, Jul 8, 2019 at 1:46 PM Yang Xu<xuyang2018.jy@cn.fujitsu.com> wrote:
>>>> Since Amir path for copy_file_range has been merged into linux-xfs,
>>>> I add test for swapfile, immutable file, bounds in ltp. Also, add test
>>>> for block char pipe dev and remove EXDEV test(5.3 will relax the cross-device
>>>> constraint[2]). I follow xfstests code[3][4][5] and increase it .
>>>>
>>>> [1]https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git/commit/?h=for-next-5.3&id=5dae222a5ff0c269730393018a5539cc970a4726
>>>> [2]https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git/commit/?h=for-next-5.3&id=96e6e8f4a68df2d94800311163faa67124df24e5
>>>> [3]https://patchwork.kernel.org/patch/10971759/
>>>> [4]https://patchwork.kernel.org/patch/10971747/
>>>> [5]https://patchwork.kernel.org/patch/10961421/
>>>>
>>>> Signed-off-by: Yang Xu<xuyang2018.jy@cn.fujitsu.com>
>>>> ---
>>>> .../copy_file_range/copy_file_range.h | 11 +-
>>>> .../copy_file_range/copy_file_range02.c | 139 +++++++++++++++---
>>>> 2 files changed, 130 insertions(+), 20 deletions(-)
>>>>
>>>> diff --git a/testcases/kernel/syscalls/copy_file_range/copy_file_range.h b/testcases/kernel/syscalls/copy_file_range/copy_file_range.h
>>>> index b6d132978..f9e2565d9 100644
>>>> --- a/testcases/kernel/syscalls/copy_file_range/copy_file_range.h
>>>> +++ b/testcases/kernel/syscalls/copy_file_range/copy_file_range.h
>>>> @@ -9,6 +9,7 @@
>>>>
>>>> #include<stdbool.h>
>>>> #include<unistd.h>
>>>> +#include<sys/sysmacros.h>
>>>> #include "lapi/syscalls.h"
>>>>
>>>> #define TEST_VARIANTS 2
>>>> @@ -18,10 +19,18 @@
>>>> #define FILE_DEST_PATH "file_dest"
>>>> #define FILE_RDONL_PATH "file_rdonl"
>>>> #define FILE_DIR_PATH "file_dir"
>>>> -#define FILE_MNTED_PATH MNTPOINT"/file_mnted"
>>>> +#define FILE_IMMUTABLE_PATH "file_immutable"
>>>> +#define FILE_SWAP_PATH "file_swap"
>>>> +#define FILE_BLKDEV "file_blk"
>>>> +#define FILE_CHRDEV "file_chr"
>>>> +#define FILE_FIFO "file_fifo"
>>>> +#define FILE_COPY_PATH "file_copy"
>>>>
>>>> #define CONTENT "ABCDEFGHIJKLMNOPQRSTUVWXYZ12345\n"
>>>> #define CONTSIZE (sizeof(CONTENT) - 1)
>>>> +#define MAX_LEN ((long long)(~0ULL>> 1))
>>>> +#define MIN_OFF 65537
>>>> +#define MAX_OFF (MAX_LEN - MIN_OFF)
>>> In the xfstest the value of MAX_OFF is ((1ULL<< 63) - MIN_OFF)
>>> Not sure why it was changed here?
>> Because the LONG LONG max value in kernel linux/limit.h is defined as" #define LLONG_MAX ((long long)(~0ULL>> 1))".
>> I think it is a common usage. If you don't like this way, I will use the xfstests vaule.
> No it makes sense. VFS max size is larger than XFS max size and
> I think btrfs is limited for the VFS max.
>
> Maybe it is better to define MAX_LFS_FILESIZE if it is not defined
> in some ltp header file and #define MAX_LEN MAX_LFS_FILESIZE
> leaving comments where due.
>
> Also, I now wonder if running this test on 32bit kernel and with test
> compiled for 32bit will yield the expected errors?
Hi Amir
I have sent a v3 patch. I split it into 3 patch.
lib: alter find_free_loopdev()
syscalls/copy_file_range01: add cross-device test
syscalls/copy_file_range02: increase coverage and remove EXDEV test
I don't have 32bit machine or vm. It takes some time. Please wait.
ps: If someone can help to test it, it will be great.
Thanks,
Yang Xu
> Thanks,
> Amir.
>
>
>
next prev parent reply other threads:[~2019-07-10 7:32 UTC|newest]
Thread overview: 79+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-03 3:41 [LTP] [PATCH] syscalls/copy_file_range02: increase coverage and remove EXDEV test Yang Xu
2019-07-05 15:22 ` Amir Goldstein
2019-07-05 20:42 ` [LTP] [PATCH v2] " Yang Xu
2019-07-08 15:17 ` Amir Goldstein
2019-07-09 6:57 ` Yang Xu
2019-07-09 10:06 ` Amir Goldstein
2019-07-10 7:18 ` [LTP] [PATCH v3 1/3] lib: alter find_free_loopdev() Yang Xu
2019-07-10 7:18 ` [LTP] [PATCH v3 2/3] syscalls/copy_file_range01: add cross-device test Yang Xu
2019-07-10 7:50 ` Amir Goldstein
2019-07-10 8:22 ` Yang Xu
2019-07-10 7:18 ` [LTP] [PATCH v3 3/3] syscalls/copy_file_range02: increase coverage and remove EXDEV test Yang Xu
2019-07-10 7:57 ` Amir Goldstein
2019-07-10 9:31 ` Yang Xu
2019-07-10 10:53 ` [LTP] [PATCH v4 1/3] lib: alter find_free_loopdev() Yang Xu
2019-07-10 10:53 ` [LTP] [PATCH v4 2/3] syscalls/copy_file_range01: add cross-device test Yang Xu
2019-07-10 15:56 ` Xiao Yang
2019-07-11 6:18 ` Yang Xu
2019-07-10 10:53 ` [LTP] [PATCH v4 3/3] syscalls/copy_file_range02: increase coverage and remove EXDEV test Yang Xu
2019-07-10 13:57 ` [LTP] [PATCH v4 1/3] lib: alter find_free_loopdev() Cyril Hrubis
2019-07-11 4:00 ` Yang Xu
2019-07-11 12:51 ` Cyril Hrubis
2019-07-12 5:25 ` Yang Xu
2019-07-17 5:29 ` Yang Xu
2019-07-17 6:10 ` Amir Goldstein
2019-07-17 9:44 ` [LTP] [PATCH v5 " Yang Xu
2019-07-17 9:44 ` [LTP] [PATCH v5 2/3] syscalls/copy_file_range01: add cross-device test Yang Xu
2019-07-29 13:56 ` Petr Vorel
2019-07-29 13:59 ` Petr Vorel
2019-07-17 9:44 ` [LTP] [PATCH v5 3/3] syscalls/copy_file_range02: increase coverage and remove EXDEV test Yang Xu
2019-07-17 10:14 ` [LTP] [PATCH v5 1/3] lib: alter find_free_loopdev() Amir Goldstein
2019-07-17 10:34 ` Yang Xu
2019-07-17 10:54 ` Cyril Hrubis
2019-07-18 7:30 ` Yang Xu
2019-07-25 5:01 ` [LTP] [PATCH v6 " Yang Xu
2019-07-25 5:01 ` [LTP] [PATCH v6 2/3] syscalls/copy_file_range01: add cross-device test Yang Xu
2019-07-29 14:00 ` Petr Vorel
2019-07-29 14:10 ` Petr Vorel
2019-07-30 8:31 ` Yang Xu
2019-07-30 13:35 ` Petr Vorel
2019-07-31 7:01 ` Yang Xu
2019-07-31 7:47 ` Petr Vorel
2019-07-25 5:01 ` [LTP] [PATCH v6 3/3] syscalls/copy_file_range02: increase coverage and remove EXDEV test Yang Xu
2019-07-25 5:24 ` Amir Goldstein
2019-07-25 5:44 ` Yang Xu
2019-07-25 8:08 ` Amir Goldstein
2019-07-25 10:13 ` Yang Xu
2019-07-25 11:02 ` Amir Goldstein
2019-07-30 13:26 ` Petr Vorel
2019-07-31 7:09 ` Yang Xu
2019-07-29 13:01 ` [LTP] [PATCH v6 1/3] lib: alter find_free_loopdev() Cyril Hrubis
2019-07-30 10:42 ` Yang Xu
2019-07-30 11:05 ` Cyril Hrubis
2019-07-31 10:40 ` [LTP] [PATCH v7 " Yang Xu
2019-07-31 10:40 ` [LTP] [PATCH v7 2/3] syscalls/copy_file_range01: add cross-device test Yang Xu
2019-07-31 12:28 ` Petr Vorel
2019-07-31 10:40 ` [LTP] [PATCH v7 3/3] syscalls/copy_file_range02: increase coverage and remove EXDEV test Yang Xu
2019-07-31 12:28 ` Petr Vorel
2019-08-05 6:58 ` Murphy Zhou
2019-08-05 7:11 ` Yang Xu
2019-08-05 10:22 ` Murphy Zhou
2019-08-05 11:01 ` Yang Xu
2019-08-06 6:37 ` Yang Xu
2019-08-06 9:29 ` Murphy Zhou
2019-08-06 16:27 ` Petr Vorel
2019-08-07 10:17 ` Murphy Zhou
2019-08-07 12:12 ` Dave Chinner
2019-08-08 3:46 ` Murphy Zhou
2019-08-08 3:11 ` Yang Xu
2019-08-08 3:57 ` Murphy Zhou
2019-08-27 10:04 ` Petr Vorel
2019-07-31 12:05 ` [LTP] [PATCH v7 1/3] lib: alter find_free_loopdev() Petr Vorel
2019-07-31 12:28 ` Cyril Hrubis
2019-07-31 12:48 ` Petr Vorel
2019-07-31 13:25 ` Cyril Hrubis
2019-07-31 21:06 ` Petr Vorel
2019-07-31 12:07 ` Petr Vorel
2019-07-10 7:47 ` [LTP] [PATCH v3 " Amir Goldstein
2019-07-10 7:32 ` Yang Xu [this message]
2019-07-08 10:38 ` [LTP] [PATCH] syscalls/copy_file_range02: increase coverage and remove EXDEV test Yang Xu
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=5D25947F.8000700@cn.fujitsu.com \
--to=xuyang2018.jy@cn.fujitsu.com \
--cc=ltp@lists.linux.it \
/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