All of lore.kernel.org
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: "zhengbin (A)" <zhengbin13@huawei.com>
Cc: Eryu Guan <guaneryu@gmail.com>,
	Dave Chinner <david@fromorbit.com>,
	fstests <fstests@vger.kernel.org>, Hou Tao <houtao1@huawei.com>,
	zhaohongjiang@huawei.com
Subject: Re: [PATCH 0/6] squashfs: introduce squashfs support
Date: Mon, 25 Feb 2019 08:45:53 +0200	[thread overview]
Message-ID: <CAOQ4uxg2M6+QFGdgB9o2UKbRbYH_PixpcNwWoGHkkSXOnoEj6A@mail.gmail.com> (raw)
In-Reply-To: <CAOQ4uxjvPUeEY=drBt=SoWPo7yK+yiYh3dbvMG+3YAWvTsJrfw@mail.gmail.com>

On Mon, Feb 25, 2019 at 7:21 AM Amir Goldstein <amir73il@gmail.com> wrote:
>
> On Mon, Feb 25, 2019 at 3:33 AM zhengbin (A) <zhengbin13@huawei.com> wrote:
> >
> > Thanks for your reply.
> >
> > > I don't quite like the idea of "forking" random tests from 'generic' to
> > > 'readonly'. The biggest benefit of adding new fs support to fstests is
> > > that it shares most of the 'generic' tests and gets good test coverage.
> > > But forking a very small subset of generic tests not only defeats the
> > > benefit but also adding extra maintain burden
> > --->I agree that, but if we want to add readonly filesystem support in fstests,
> > maybe it is the best way?I didn't find a better way
> >
> > On 2019/2/24 23:39, Eryu Guan wrote:
> > > [Sorry for being so long to review this squashfs support.]
> > >
> > > On Tue, Jan 22, 2019 at 11:24:02AM +0800, zhengbin wrote:
> > >> This patch add squashfs support in xfstests-dev. Add two directories
> > >> in tests directory, readonly can also be used for other readonly
> > >> filesystem, squashfs is just used for squashfs filesystem.
> > >> tests/readonly/001        mount test
> > >> tests/readonly/002--010   metadata test
> > >> tests/readonly/011--018   data test
> > >> tests/readonly/019--021   xattr test
> > >> tests/squashfs/001--005   mksquashfs options test
> > >
> > > I don't quite like the idea of "forking" random tests from 'generic' to
> > > 'readonly'. The biggest benefit of adding new fs support to fstests is
> > > that it shares most of the 'generic' tests and gets good test coverage.
> > > But forking a very small subset of generic tests not only defeats the
> > > benefit but also adding extra maintain burden.
> > >
> > > But the problem is that squashfs is a readonly filesystem and sharing
> > > the existing generic tests is not easy. (Actually I've been looking at
> > > this series several times, but couldn't come out with a good solution.)
> > > Because fstests harness assumes the filesystem being tested is writable
> > > by default, various _require rules also write/create files to check if a
> > > functionality is supported by the underlying filesystem. This leads me
> > > to wonder if fstests is suitable for such readonly filesystems?
> > >
> > > I'm glad to hear what do others think, any comments are welcomed!
> > >
>
> Maybe the problem is not the forking of readonly tests, but the fact that
> these tests cannot be shared as is with other filesystems.
> I know I once fixed a bug or two when ext4 was mounted on a readonly
> blockdev (i.e. with ext4 snapshots).
>
> readonly tests could be meaningful to other filesystems if constructed as:
> _require_scratch_readonly_blkdev
> _scratch_blkdev_setrw
> _scratch_mkfs
> _scratch_mount
> setup()
> _scratch_umount
> _scratch_blkdev_setro
> _scratch_mount_readonly_blkdev
> test()
>
> Of course for squashfs, _scratch_mount will be "mounting" a
> scratch tmpdir and only _scratch_mount_readonly_blkdev
> will really be mounting a squashfs.
>

Yet another option is to make these tests about filesystems
that require "_scratch_mkfs_from_tmpdir".
I know ext4 has this tool used for creating an Android read-only
and compact system image, not sure if e2fsprogs has a similar
functionality. I remember reading about similar functionality for
mkfs.xfs.

Some overlayfs tests might possibly be generalized with this
format, because preparing the lower layer can be replaced by
copying file from tmpdir to lower layer on _scratch_mkfs_from_tmpdir.
This could also be a direction towards supporting -overlay tests
with squashfs, which is a rather common combination in the wild
(OpenWRT AFAIK).

Thanks,
Amir.

  reply	other threads:[~2019-02-25  6:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-22  3:24 [PATCH 0/6] squashfs: introduce squashfs support zhengbin
2019-01-22  3:24 ` [PATCH 1/6] squashfs: add " zhengbin
2019-01-22  3:24 ` [PATCH 2/6] squashfs: add mount test zhengbin
2019-01-22  3:24 ` [PATCH 3/6] squashfs: add metadata test zhengbin
2019-01-22  3:24 ` [PATCH 4/6] squashfs: add data test zhengbin
2019-01-22  3:24 ` [PATCH 5/6] squashfs: add xattr test zhengbin
2019-01-22  3:24 ` [PATCH 6/6] squashfs: add mksquashfs options test zhengbin
2019-01-25 10:49 ` [PATCH 0/6] squashfs: introduce squashfs support zhengbin (A)
2019-01-29 14:44   ` zhengbin (A)
2019-02-03  9:20     ` Eryu Guan
2019-02-24 15:39 ` Eryu Guan
2019-02-25  1:32   ` zhengbin (A)
2019-02-25  5:21     ` Amir Goldstein
2019-02-25  6:45       ` Amir Goldstein [this message]
2019-03-18 12:30       ` zhengbin (A)
2019-02-25  7:55   ` Gao Xiang

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=CAOQ4uxg2M6+QFGdgB9o2UKbRbYH_PixpcNwWoGHkkSXOnoEj6A@mail.gmail.com \
    --to=amir73il@gmail.com \
    --cc=david@fromorbit.com \
    --cc=fstests@vger.kernel.org \
    --cc=guaneryu@gmail.com \
    --cc=houtao1@huawei.com \
    --cc=zhaohongjiang@huawei.com \
    --cc=zhengbin13@huawei.com \
    /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.