fstests.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: Mauricio Faria de Oliveira <mfo@canonical.com>
Cc: fstests <fstests@vger.kernel.org>
Subject: Re: [PATCH] common/overlay,rc: introduce OVL_ALT_FSTYP for testing aufs
Date: Thu, 13 Feb 2020 11:57:42 +0200	[thread overview]
Message-ID: <CAOQ4uxjA4n7uJSUTHpRx_228HuBTtt5nNV8H0JmeKmczK_QBMA@mail.gmail.com> (raw)
In-Reply-To: <20200213000406.4966-1-mfo@canonical.com>

On Thu, Feb 13, 2020 at 2:05 AM Mauricio Faria de Oliveira
<mfo@canonical.com> wrote:
>
> Recently looking for an aufs test suite. The author clarified that
> 'There is no public test suite specific to aufs.' [1] at this time,
> and it looks like 'xfstests/tests/generic' should be enough [1, 2],
> and is clearly an improvement in terms of publicly available tests.
>
> Thus, building on top of the existing infrastructure for overlay,
> just introduce OVL_ALT_FSTYP that can be set to "aufs" to use it.
> (using overlay's upperdir as rw-branch and lowerdir as ro-branch).
>
> This is indeed a workaround^W simple change that does the job vs.
> creating a new FSTYP "aufs" and mechanically changing the number
> of places that check for "overlay" to just handle "aufs" as well.
> (so the effort is still small as aufs has no specific tests now.)

Very nice!
Please update README.overlay.

FYI, I made a similar small change to enable testing of fuse.overlay
with unionmount-testsuite:
https://github.com/amir73il/unionmount-testsuite/commit/a72c274e0f5d6d05ad7c563fc7eff42356bffd15
Therefore:
1. Your changes could be useful for testing fuse.overlay with xfstests
2. You can just as easily test aufs with unionmount-testsuite -
The test coverage is mostly orthogonal to that of xfstests
(patches are welcome)

>
> Currently, running the generic + overlay (i.e., ./check -overlay)
> tests (and excluding a few [3] which either hang or keep looping)
> the numbers for aufs on loop devices on v5.4-based Ubuntu kernel
> show a relatively good starting base in terms of exercising code:
>
>   - Ran: 645 tests
>   - Not run: 483 tests
>   - Failures: 21 tests

I'd be interested to know the stats for the overlay/* tests.

>
> So, hopefully this may be a starting point as an aufs test suite.
>
> [1] https://sourceforge.net/p/aufs/mailman/message/36918721/
> [2] https://sourceforge.net/p/aufs/mailman/message/36918932/
> [3] Steps:
>
>   $ export OVL_ALT_FSTYP=aufs
>   $ export FSTYP=ext4
>   $ export TEST_DEV=/dev/loop0
>   $ export TEST_DIR=/mnt/test
>   $ export SCRATCH_DEV=/dev/loop1
>   $ export SCRATCH_MNT=/mnt/scratch
>
>   $ sudo mkfs.$FSTYP -F $TEST_DEV
>   $ sudo mkfs.$FSTYP -F $SCRATCH_DEV
>   $ sudo mkdir $TEST_DIR $SCRATCH_MNT
>
>   $ cat <<EOF >/tmp/exclude-tests
>   generic/013
>   generic/070
>   generic/075
>   generic/112
>   generic/127
>   generic/461
>   generic/476
>   generic/522
>   generic/530
>   overlay/019
>   EOF
>
>   $ sudo -E ./check -overlay -E /tmp/exclude-tests
> ---
>  common/overlay | 6 ++++++
>  common/rc      | 4 ++++
>  2 files changed, 10 insertions(+)
>
> diff --git a/common/overlay b/common/overlay
> index 65c639e9c6d8..3b3351ed040e 100644
> --- a/common/overlay
> +++ b/common/overlay
> @@ -20,6 +20,12 @@ _overlay_mount_dirs()
>         local workdir=$3
>         shift 3
>
> +       if [ -n "$OVL_ALT_FSTYP" -a "$OVL_ALT_FSTYP" = "aufs" ]; then
> +               $MOUNT_PROG -t aufs -o br=$upperdir=rw:$lowerdir=ro \
> +                       `_common_dev_mount_options $*`
> +               return $?
> +       fi
> +
>         $MOUNT_PROG -t overlay -o lowerdir=$lowerdir -o upperdir=$upperdir \
>                     -o workdir=$workdir `_common_dev_mount_options $*`

I think it would be better to define (in common/config):

export OVL_FSTYP=${OVL_FSTYP:="overlay"}

And make sure to always mount -t $OVL_FSTYP
then you won't need to check if  OVL_ALT_FSTYP is non empty.
and setting OVL_FSTYP to "fuse.overlay" should mostly work.

I did find 5 overlay tests that do mount -t overlay not via any
of the common helpers, so you'll need to handle those, possibly
with another common helper that supports middle layers:
tests/overlay/011
tests/overlay/035
tests/overlay/052
tests/overlay/053
tests/overlay/062

Thanks,
Amir.

  reply	other threads:[~2020-02-13  9:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-13  0:04 [PATCH] common/overlay,rc: introduce OVL_ALT_FSTYP for testing aufs Mauricio Faria de Oliveira
2020-02-13  9:57 ` Amir Goldstein [this message]
2020-02-13 13:19   ` Mauricio Faria de Oliveira

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=CAOQ4uxjA4n7uJSUTHpRx_228HuBTtt5nNV8H0JmeKmczK_QBMA@mail.gmail.com \
    --to=amir73il@gmail.com \
    --cc=fstests@vger.kernel.org \
    --cc=mfo@canonical.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).