All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: Andrea Cervesato <andrea.cervesato@suse.de>,
	ltp@lists.linux.it, linux-bcachefs@vger.kernel.org,
	Kent Overstreet <kent.overstreet@linux.dev>
Subject: Re: [LTP] [PATCH v2 3/7] Add ioctl_ficlone02 test
Date: Mon, 29 Jul 2024 23:29:28 +0200	[thread overview]
Message-ID: <20240729212928.GA1299602@pevik> (raw)
In-Reply-To: <ZqeFKkUbhlikEfNS@yuki>

Hi Cyril, all,

> Hi!
> > This test, merged as [1] fails on bcachefs:

> > $ cd testcases/kernel/syscalls/ioctl/
> > # # LTP_SINGLE_FS_TYPE=bcachefs ./ioctl_ficlone02
> > tst_buffers.c:57: TINFO: Test is using guarded buffers
> > tst_tmpdir.c:316: TINFO: Using /tmp/LTP_iocu1xhKp as tmpdir (tmpfs filesystem)
> > tst_device.c:96: TINFO: Found free device 0 '/dev/loop0'
> > tst_test.c:1806: TINFO: LTP version: 20240524-131-gdfb293ee0
> > tst_test.c:1650: TINFO: Timeout per run is 0h 00m 30s
> > tst_supported_fs_types.c:161: TINFO: WARNING: testing only bcachefs
> > tst_supported_fs_types.c:97: TINFO: Kernel supports bcachefs
> > tst_supported_fs_types.c:62: TINFO: mkfs.bcachefs does exist
> > tst_test.c:1746: TINFO: === Testing on bcachefs ===
> > tst_test.c:1111: TINFO: Formatting /dev/loop0 with bcachefs opts='' extra opts=''
> > tst_test.c:1123: TINFO: Mounting /dev/loop0 to /tmp/LTP_iocu1xhKp/mnt fstyp=bcachefs flags=0
> > ioctl_ficlone02.c:33: TFAIL: ioctl(dst_fd, FICLONE, src_fd) succeeded
> > ioctl_ficlone02.c:34: TFAIL: ioctl(dst_fd, FICLONERANGE, clone_range) expected EOPNOTSUPP: EINVAL (22)

> This looks that FIOCLONE is supported on bcachefs and bcachefs should be
> skipped in this test as well. And I suppose that we should enable
> bcachefs in the rest of the FICLONE tests too.

Thanks! (I should have read the test description).
I dared to enable it + skip on ioctl_ficlone02.c and merge with your SBT

https://github.com/linux-test-project/ltp/commit/b3d9561793657239548269378d02f65580917e7c

> BTW, the EINVAL in the second subtest is caused by the fact that we
> attempt to clone a range that does not exist, this can be fixed by:

> diff --git a/testcases/kernel/syscalls/ioctl/ioctl_ficlone02.c b/testcases/kernel/syscalls/ioctl/ioctl_ficlone02.c
> index be3b01c29..17452a1a3 100644
> --- a/testcases/kernel/syscalls/ioctl/ioctl_ficlone02.c
> +++ b/testcases/kernel/syscalls/ioctl/ioctl_ficlone02.c
> @@ -43,6 +43,8 @@ static void setup(void)

>         SAFE_STAT(MNTPOINT, &sb);

> +       tst_fill_file(SRCPATH, 0x00, sb.st_blksize, 1);
> +
>         clone_range->src_offset = 0;
>         clone_range->src_length = sb.st_blksize;
>         clone_range->dest_offset = 0;

Thanks, again! This is less confusing. I again dared to merge with your SBT:
https://github.com/linux-test-project/ltp/commit/9c6390812831f5c36e531be5a25bd8d7862e79fb

Kind regards,
Petr

WARNING: multiple messages have this Message-ID (diff)
From: Petr Vorel <pvorel@suse.cz>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: linux-bcachefs@vger.kernel.org,
	Kent Overstreet <kent.overstreet@linux.dev>,
	ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2 3/7] Add ioctl_ficlone02 test
Date: Mon, 29 Jul 2024 23:29:28 +0200	[thread overview]
Message-ID: <20240729212928.GA1299602@pevik> (raw)
In-Reply-To: <ZqeFKkUbhlikEfNS@yuki>

Hi Cyril, all,

> Hi!
> > This test, merged as [1] fails on bcachefs:

> > $ cd testcases/kernel/syscalls/ioctl/
> > # # LTP_SINGLE_FS_TYPE=bcachefs ./ioctl_ficlone02
> > tst_buffers.c:57: TINFO: Test is using guarded buffers
> > tst_tmpdir.c:316: TINFO: Using /tmp/LTP_iocu1xhKp as tmpdir (tmpfs filesystem)
> > tst_device.c:96: TINFO: Found free device 0 '/dev/loop0'
> > tst_test.c:1806: TINFO: LTP version: 20240524-131-gdfb293ee0
> > tst_test.c:1650: TINFO: Timeout per run is 0h 00m 30s
> > tst_supported_fs_types.c:161: TINFO: WARNING: testing only bcachefs
> > tst_supported_fs_types.c:97: TINFO: Kernel supports bcachefs
> > tst_supported_fs_types.c:62: TINFO: mkfs.bcachefs does exist
> > tst_test.c:1746: TINFO: === Testing on bcachefs ===
> > tst_test.c:1111: TINFO: Formatting /dev/loop0 with bcachefs opts='' extra opts=''
> > tst_test.c:1123: TINFO: Mounting /dev/loop0 to /tmp/LTP_iocu1xhKp/mnt fstyp=bcachefs flags=0
> > ioctl_ficlone02.c:33: TFAIL: ioctl(dst_fd, FICLONE, src_fd) succeeded
> > ioctl_ficlone02.c:34: TFAIL: ioctl(dst_fd, FICLONERANGE, clone_range) expected EOPNOTSUPP: EINVAL (22)

> This looks that FIOCLONE is supported on bcachefs and bcachefs should be
> skipped in this test as well. And I suppose that we should enable
> bcachefs in the rest of the FICLONE tests too.

Thanks! (I should have read the test description).
I dared to enable it + skip on ioctl_ficlone02.c and merge with your SBT

https://github.com/linux-test-project/ltp/commit/b3d9561793657239548269378d02f65580917e7c

> BTW, the EINVAL in the second subtest is caused by the fact that we
> attempt to clone a range that does not exist, this can be fixed by:

> diff --git a/testcases/kernel/syscalls/ioctl/ioctl_ficlone02.c b/testcases/kernel/syscalls/ioctl/ioctl_ficlone02.c
> index be3b01c29..17452a1a3 100644
> --- a/testcases/kernel/syscalls/ioctl/ioctl_ficlone02.c
> +++ b/testcases/kernel/syscalls/ioctl/ioctl_ficlone02.c
> @@ -43,6 +43,8 @@ static void setup(void)

>         SAFE_STAT(MNTPOINT, &sb);

> +       tst_fill_file(SRCPATH, 0x00, sb.st_blksize, 1);
> +
>         clone_range->src_offset = 0;
>         clone_range->src_length = sb.st_blksize;
>         clone_range->dest_offset = 0;

Thanks, again! This is less confusing. I again dared to merge with your SBT:
https://github.com/linux-test-project/ltp/commit/9c6390812831f5c36e531be5a25bd8d7862e79fb

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2024-07-29 21:29 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-23  7:15 [LTP] [PATCH v2 0/7] Add ioctl_ficlone testing suite Andrea Cervesato
2024-07-23  7:15 ` [LTP] [PATCH v2 1/7] Add fallback definitions for lapi/fs.h Andrea Cervesato
2024-07-24 11:52   ` Cyril Hrubis
2024-07-24 16:29   ` Cyril Hrubis
2024-07-25  7:11     ` Li Wang
2024-07-25  9:18       ` Cyril Hrubis
2024-07-25 12:55       ` Petr Vorel
2024-07-25 15:17         ` Cyril Hrubis
2024-07-26 12:03           ` Li Wang
2024-07-23  7:15 ` [LTP] [PATCH v2 2/7] Add ioctl_ficlone01 test Andrea Cervesato
2024-07-23  7:15 ` [LTP] [PATCH v2 3/7] Add ioctl_ficlone02 test Andrea Cervesato
2024-07-29 11:53   ` Petr Vorel
2024-07-29 11:53     ` Petr Vorel
2024-07-29 12:03     ` Cyril Hrubis
2024-07-29 12:03       ` Cyril Hrubis
2024-07-29 21:29       ` Petr Vorel [this message]
2024-07-29 21:29         ` Petr Vorel
2024-07-23  7:15 ` [LTP] [PATCH v2 4/7] Add ioctl_ficlone03 test Andrea Cervesato
2024-07-24 12:20   ` Cyril Hrubis
2024-07-23  7:15 ` [LTP] [PATCH v2 5/7] Add ioctl_ficlonerange01 test Andrea Cervesato
2024-07-24 15:24   ` Cyril Hrubis
2024-07-24 15:34     ` Cyril Hrubis
2024-07-23  7:15 ` [LTP] [PATCH v2 6/7] Add ioctl_ficlonerange02 test Andrea Cervesato
2024-07-24 15:37   ` Cyril Hrubis
2024-07-23  7:15 ` [LTP] [PATCH v2 7/7] Add ioctl_ficlone04 test Andrea Cervesato
2024-07-24 15:42   ` Cyril Hrubis
2024-07-24 19:36     ` Andrea Cervesato via ltp
2024-07-24 20:06       ` Cyril Hrubis
2024-07-25  7:16         ` Andrea Cervesato via ltp

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=20240729212928.GA1299602@pevik \
    --to=pvorel@suse.cz \
    --cc=andrea.cervesato@suse.de \
    --cc=chrubis@suse.cz \
    --cc=kent.overstreet@linux.dev \
    --cc=linux-bcachefs@vger.kernel.org \
    --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 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.