From patchwork Tue Jul 4 12:14:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amir Goldstein X-Patchwork-Id: 9824733 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E7EEC602F0 for ; Tue, 4 Jul 2017 12:13:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D6C7827F88 for ; Tue, 4 Jul 2017 12:13:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CA3702823E; Tue, 4 Jul 2017 12:13:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9A4D327F88 for ; Tue, 4 Jul 2017 12:13:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752099AbdGDMN5 (ORCPT ); Tue, 4 Jul 2017 08:13:57 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:34760 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752052AbdGDMNz (ORCPT ); Tue, 4 Jul 2017 08:13:55 -0400 Received: by mail-wm0-f65.google.com with SMTP id p204so25971605wmg.1; Tue, 04 Jul 2017 05:13:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=XXK214ftqVO8nTOMTYvfHpJ+3rhO0H30EjZ3ACPYVWY=; b=Ebb1VTjg0ghoj5R6qb1SIcNFxgOHZIj737BWhY3GQcAPXsRNAt7xI5Rmb0xKBtBfuO obVpVEUMnMlzaCgiEMS3vxCwFtQwXUPSNnLmIWkZpo44i2gOm2OzWHd4oTKt4coXoZtU e8zDM9rxknMX1ZOZokoROcp9dVGvUWosf8mFa6U8+Bv+cnN6GjVe4IEs5wdbYXmNgjzK 8OCGi2TWgUotJm7ziixynAbnU22xH0666kG+nRNACojunhs25wvDlTIPEVlNw0V1BYrH p92eo0KPdbS0kZiLzugtLG/AxZ+G3MgeZ0xEIeNYnC6+BImom8Q2kV2HJYHXGfl5Lq2n Ll8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=XXK214ftqVO8nTOMTYvfHpJ+3rhO0H30EjZ3ACPYVWY=; b=ssgkCBLs3DD+pCnV2ihVFZwqB1sWHZLtjm1h/f3OEy3RKYYWaOBWdF27qMjPLwiqGH agJm2fTEZO+8udrgVO4VitJUcoNky6qABGiFinlE+5XGXV8I/beL1qQ0bsgY0JG3M3jU hFGrMXw8jcKQ1LAx0NI+LwVQJrTyI0F3xUhNn/5m0HDSE3ddhnOJR4NKEm6Hr1luazos nhlF6VvryarovA+42fpXoa0bqZgpJ4uQdsCw0qTAD9FkqjwLKGzpaEozoe61CBqetRZs hAR6vuP+1zc9jReVEcLcr1iTyjp82L6QW1litsYIOr28T/IIwzBk7ns4igaSUhEwvWkG DGyA== X-Gm-Message-State: AIVw110D63kOmTs1QcEfHbioyjombKLkvamIHou9M0oABU6M+YdiDrtT KxIbuKNS3qYKBtDS X-Received: by 10.28.63.66 with SMTP id m63mr13665671wma.118.1499170433964; Tue, 04 Jul 2017 05:13:53 -0700 (PDT) Received: from amir-VirtualBox.ctera.local (bzq-166-168-31-246.red.bezeqint.net. [31.168.166.246]) by smtp.gmail.com with ESMTPSA id m143sm9852979wmg.27.2017.07.04.05.13.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 04 Jul 2017 05:13:52 -0700 (PDT) From: Amir Goldstein To: Eryu Guan Cc: Miklos Szeredi , David Howells , linux-unionfs@vger.kernel.org, fstests@vger.kernel.org Subject: [PATCH][RFC] Run unionmount testsuite with new overlay/union test group Date: Tue, 4 Jul 2017 15:14:11 +0300 Message-Id: <1499170451-24596-1-git-send-email-amir73il@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This test group requires that unionmount-testsuite is installed under src dir. These tests use tmpfs and have no need for test nor scratch partition. Signed-off-by: Amir Goldstein --- Eryu, unionmount-testsuite, written by David Howells, is a powerfull tool for validating "union mounts", which nowadays, mostly means overlayfs. The testsuite was enhanced with directory rename tests for kernel v4.10, and with constant inode number verification for kernel v4.12. The most recent repository is maintained on my github [1]. The tool is written in python. By default, it uses tmpfs for the overlayfs layers and a complete run of all the tests in the most basic configuration takes ~10 seconds on my laptop. I have been using xfstests as a test harness to run unionmount-testsuite with several configuration (e.g. layers on same/non-same fs) and I am quite certain that more people can benefit from this setup. The proposed patch is how I use the harness, but it raises some questions: - How does xfstests community feel about relying on external repositories? - How does xfstests community feel about including python sources in the xfstests repository? There are probably very few, if any, people running the testsuite, besides Miklos and myself and I personally have no strong preference towards maintaining the tool in an external repository or in xfstests repository. Thoughts? Amir. [1] https://github.com/amir73il/unionmount-testsuite common/rc | 8 +++++++ tests/overlay/100 | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++ tests/overlay/100.out | 2 ++ tests/overlay/101 | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++ tests/overlay/101.out | 2 ++ tests/overlay/102 | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++ tests/overlay/102.out | 2 ++ tests/overlay/103 | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++ tests/overlay/103.out | 2 ++ tests/overlay/group | 4 ++++ 10 files changed, 264 insertions(+) create mode 100755 tests/overlay/100 create mode 100644 tests/overlay/100.out create mode 100755 tests/overlay/101 create mode 100644 tests/overlay/101.out create mode 100755 tests/overlay/102 create mode 100644 tests/overlay/102.out create mode 100755 tests/overlay/103 create mode 100644 tests/overlay/103.out diff --git a/common/rc b/common/rc index 57d596c..68513fb 100644 --- a/common/rc +++ b/common/rc @@ -1986,6 +1986,14 @@ _require_test_program() [ -x $SRC_TEST ] || _notrun "$SRC_TEST not built" } +# this test requires that the unionmount testsuite is installed under src/ +_require_unionmount_testsuite() +{ + UNIONMOUNT_TESTSUITE=src/unionmount-testsuite + [ -x "$UNIONMOUNT_TESTSUITE/run" ] || \ + _notrun "unionmount testsuite required." +} + # run an aio-dio program # $1 - command _run_aiodio() diff --git a/tests/overlay/100 b/tests/overlay/100 new file mode 100755 index 0000000..fb1f828 --- /dev/null +++ b/tests/overlay/100 @@ -0,0 +1,61 @@ +#! /bin/bash +# FS QA Test 100 +# +# Run unionmount testsuite to verify correctness +# with single lower layer not on same fs as upper +# +#----------------------------------------------------------------------- +# Copyright (C) 2017 CTERA Networks. All Rights Reserved. +# Author: Amir Goldstein +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it would be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +#----------------------------------------------------------------------- +# + +seq=`basename $0` +seqres=$RESULT_DIR/$seq +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +status=1 # failure is the default! +trap "_cleanup; exit \$status" 0 1 2 3 15 + +_cleanup() +{ + cd / + rm -f $tmp.* +} + +# get standard environment, filters and checks +. ./common/rc +. ./common/filter + +# remove previous $seqres.full before test +rm -f $seqres.full + +# real QA test starts here + +_supported_fs overlay +_supported_os Linux +_require_tmpfs +_require_unionmount_testsuite + +cd $UNIONMOUNT_TESTSUITE +./run --ov --verify > $seqres.full + +# success, all done +echo "Silence is golden" +status=0 +exit diff --git a/tests/overlay/100.out b/tests/overlay/100.out new file mode 100644 index 0000000..798c013 --- /dev/null +++ b/tests/overlay/100.out @@ -0,0 +1,2 @@ +QA output created by 100 +Silence is golden diff --git a/tests/overlay/101 b/tests/overlay/101 new file mode 100755 index 0000000..95d575e --- /dev/null +++ b/tests/overlay/101 @@ -0,0 +1,61 @@ +#! /bin/bash +# FS QA Test 101 +# +# Run unionmount testsuite to verify correctness +# with single lower layer on same fs as upper +# +#----------------------------------------------------------------------- +# Copyright (C) 2017 CTERA Networks. All Rights Reserved. +# Author: Amir Goldstein +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it would be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +#----------------------------------------------------------------------- +# + +seq=`basename $0` +seqres=$RESULT_DIR/$seq +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +status=1 # failure is the default! +trap "_cleanup; exit \$status" 0 1 2 3 15 + +_cleanup() +{ + cd / + rm -f $tmp.* +} + +# get standard environment, filters and checks +. ./common/rc +. ./common/filter + +# remove previous $seqres.full before test +rm -f $seqres.full + +# real QA test starts here + +_supported_fs overlay +_supported_os Linux +_require_tmpfs +_require_unionmount_testsuite + +cd $UNIONMOUNT_TESTSUITE +./run --ov --samefs --verify > $seqres.full + +# success, all done +echo "Silence is golden" +status=0 +exit diff --git a/tests/overlay/101.out b/tests/overlay/101.out new file mode 100644 index 0000000..e651a91 --- /dev/null +++ b/tests/overlay/101.out @@ -0,0 +1,2 @@ +QA output created by 101 +Silence is golden diff --git a/tests/overlay/102 b/tests/overlay/102 new file mode 100755 index 0000000..d23e8e6 --- /dev/null +++ b/tests/overlay/102 @@ -0,0 +1,61 @@ +#! /bin/bash +# FS QA Test 102 +# +# Run unionmount testsuite to verify correctness +# with multi lower layers not on same fs +# +#----------------------------------------------------------------------- +# Copyright (C) 2017 CTERA Networks. All Rights Reserved. +# Author: Amir Goldstein +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it would be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +#----------------------------------------------------------------------- +# + +seq=`basename $0` +seqres=$RESULT_DIR/$seq +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +status=1 # failure is the default! +trap "_cleanup; exit \$status" 0 1 2 3 15 + +_cleanup() +{ + cd / + rm -f $tmp.* +} + +# get standard environment, filters and checks +. ./common/rc +. ./common/filter + +# remove previous $seqres.full before test +rm -f $seqres.full + +# real QA test starts here + +_supported_fs overlay +_supported_os Linux +_require_tmpfs +_require_unionmount_testsuite + +cd $UNIONMOUNT_TESTSUITE +./run --ov=10 --verify > $seqres.full + +# success, all done +echo "Silence is golden" +status=0 +exit diff --git a/tests/overlay/102.out b/tests/overlay/102.out new file mode 100644 index 0000000..86dd1f9 --- /dev/null +++ b/tests/overlay/102.out @@ -0,0 +1,2 @@ +QA output created by 102 +Silence is golden diff --git a/tests/overlay/103 b/tests/overlay/103 new file mode 100755 index 0000000..b86c3ce --- /dev/null +++ b/tests/overlay/103 @@ -0,0 +1,61 @@ +#! /bin/bash +# FS QA Test 103 +# +# Run unionmount testsuite to verify correctness +# with multi lower layers on same fs as upper +# +#----------------------------------------------------------------------- +# Copyright (C) 2017 CTERA Networks. All Rights Reserved. +# Author: Amir Goldstein +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it would be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +#----------------------------------------------------------------------- +# + +seq=`basename $0` +seqres=$RESULT_DIR/$seq +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +status=1 # failure is the default! +trap "_cleanup; exit \$status" 0 1 2 3 15 + +_cleanup() +{ + cd / + rm -f $tmp.* +} + +# get standard environment, filters and checks +. ./common/rc +. ./common/filter + +# remove previous $seqres.full before test +rm -f $seqres.full + +# real QA test starts here + +_supported_fs overlay +_supported_os Linux +_require_tmpfs +_require_unionmount_testsuite + +cd $UNIONMOUNT_TESTSUITE +./run --ov=10 --samefs --verify > $seqres.full + +# success, all done +echo "Silence is golden" +status=0 +exit diff --git a/tests/overlay/103.out b/tests/overlay/103.out new file mode 100644 index 0000000..78212a3 --- /dev/null +++ b/tests/overlay/103.out @@ -0,0 +1,2 @@ +QA output created by 103 +Silence is golden diff --git a/tests/overlay/group b/tests/overlay/group index b55ed0c..4e74fd7 100644 --- a/tests/overlay/group +++ b/tests/overlay/group @@ -37,3 +37,7 @@ 032 auto quick copyup hardlink 033 auto quick copyup hardlink 034 auto quick copyup hardlink +100 auto quick union nonsamefs +101 auto quick union samefs +102 auto union rotate nonsamefs +103 auto union rotate samefs