From: Mauricio Faria de Oliveira <mfo@canonical.com>
To: fstests@vger.kernel.org
Cc: Amir Goldstein <amir73il@gmail.com>
Subject: [PATCH v2 5/5] common/overlay: silence some mount messages for fuse-overlayfs
Date: Fri, 14 Feb 2020 12:18:48 -0300 [thread overview]
Message-ID: <20200214151848.8328-6-mfo@canonical.com> (raw)
In-Reply-To: <20200214151848.8328-1-mfo@canonical.com>
When mouting fuse-overlayfs there are some messages that make
the tests report failures due to output mismatch; ignore them:
uid=unchanged
uid=unchanged
upperdir=/mnt/test/ovl-upper
workdir=/mnt/test/ovl-work
lowerdir=/mnt/test/ovl-lower
mountpoint=/mnt/test/ovl-mnt
For other filesystem types (e.g., overlay and aufs) make sure to
only print non-null output, to avoid blank lines output mismatch.
And return the status of the mount command, not other commands.
Currently, running './check -overlay' tests (excluding generic/062)
the numbers for fuse-overlayfs on loop devices on v5.4-based Ubuntu
kernel with the fuse-overlayfs package from Ubuntu Eoan/19.10 are:
- Ran: 530
- Not run: 395
- Failures: 29
And hopefully this helps with testing for fuse-overlayfs too.
Steps:
$ export OVL_FSTYP=fuse.fuse-overlayfs
$ 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/062
EOF
$ sudo -E ./check -overlay -E /tmp/exclude-tests
Signed-off-by: Mauricio Faria de Oliveira <mfo@canonical.com>
---
common/overlay | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/common/overlay b/common/overlay
index a1076926c23f..27f3c08252ee 100644
--- a/common/overlay
+++ b/common/overlay
@@ -19,6 +19,8 @@ _overlay_mount_dirs()
local upperdir=$2
local workdir=$3
local options
+ local output
+ local rc
shift 3
options="-o lowerdir=$lowerdir -o upperdir=$upperdir -o workdir=$workdir"
@@ -26,7 +28,23 @@ _overlay_mount_dirs()
options="-o br=$upperdir=rw -o br=$lowerdir=ro"
fi
- $MOUNT_PROG -t $OVL_FSTYP $options `_common_dev_mount_options $*`
+ options="$options `_common_dev_mount_options $*`"
+ output="`$MOUNT_PROG -t $OVL_FSTYP $options 2>&1`"
+ rc=$?
+
+ if [ "$OVL_FSTYP" = "fuse.fuse-overlayfs" ]; then
+ # Less verbosity to avoid output mismatch.
+ echo "$output" | grep -v \
+ -e "^uid=" \
+ -e "^upperdir=" \
+ -e "^lowerdir=" \
+ -e "^workdir=" \
+ -e "^mountpoint="
+ elif [ -n "$output" ]; then
+ echo "$output"
+ fi
+
+ return $rc
}
# Mount with same options/mnt/dev of scratch mount, but optionally
--
2.20.1
next prev parent reply other threads:[~2020-02-14 15:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-14 15:18 [PATCH v2 0/5] fstests: overlay: initial support for aufs and Mauricio Faria de Oliveira
2020-02-14 15:18 ` [PATCH v2 1/5] common/overlay,rc,config: introduce OVL_FSTYP variable and aufs Mauricio Faria de Oliveira
2020-02-14 22:06 ` Amir Goldstein
2020-02-14 15:18 ` [PATCH v2 2/5] tests/overlay: mount: replace overlay hardcode with OVL_FSTYP variable Mauricio Faria de Oliveira
2020-02-14 22:12 ` Amir Goldstein
2020-02-14 15:18 ` [PATCH v2 3/5] common/rc: introduce new helper function _fs_type_dev_dir() Mauricio Faria de Oliveira
2020-02-14 22:20 ` Amir Goldstein
2020-02-14 15:18 ` [PATCH v2 4/5] common/rc: add quirks for fuse-overlayfs device/mount point Mauricio Faria de Oliveira
2020-02-14 22:37 ` Amir Goldstein
2020-02-14 15:18 ` Mauricio Faria de Oliveira [this message]
2020-02-14 22:51 ` [PATCH v2 5/5] common/overlay: silence some mount messages for fuse-overlayfs Amir Goldstein
2020-02-14 18:45 ` [PATCH v2 0/5] fstests: overlay: initial support for aufs and Amir Goldstein
2020-02-17 15:44 ` 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=20200214151848.8328-6-mfo@canonical.com \
--to=mfo@canonical.com \
--cc=amir73il@gmail.com \
--cc=fstests@vger.kernel.org \
/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).