From patchwork Fri Jul 21 22:04:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 9857751 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 B1D04600F5 for ; Fri, 21 Jul 2017 22:05:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9FCCB285B6 for ; Fri, 21 Jul 2017 22:05:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 92F3C285DB; Fri, 21 Jul 2017 22:05:09 +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.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY 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 5F285285B6 for ; Fri, 21 Jul 2017 22:05:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754876AbdGUWFH (ORCPT ); Fri, 21 Jul 2017 18:05:07 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:35713 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754885AbdGUWFF (ORCPT ); Fri, 21 Jul 2017 18:05:05 -0400 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v6LM50Ws011063 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 21 Jul 2017 22:05:01 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.13.8/8.14.4) with ESMTP id v6LM50Zl013249 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 21 Jul 2017 22:05:00 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v6LM50wV004436; Fri, 21 Jul 2017 22:05:00 GMT Received: from localhost (/10.159.239.81) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 21 Jul 2017 15:05:00 -0700 Subject: [PATCH 5/5] xfs: test fuzzing every field of a dquot From: "Darrick J. Wong" To: eguan@redhat.com, darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Fri, 21 Jul 2017 15:04:58 -0700 Message-ID: <150067469875.30639.1164952553984333812.stgit@magnolia> In-Reply-To: <150067465981.30639.14801416171688538711.stgit@magnolia> References: <150067465981.30639.14801416171688538711.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Darrick J. Wong See what happens when we fuzz every field of a quota information structure. Signed-off-by: Darrick J. Wong --- tests/xfs/1380 | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++ tests/xfs/1380.out | 4 +++ tests/xfs/1381 | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++ tests/xfs/1381.out | 4 +++ tests/xfs/1382 | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++ tests/xfs/1382.out | 4 +++ tests/xfs/1383 | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++ tests/xfs/1383.out | 4 +++ tests/xfs/1384 | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++ tests/xfs/1384.out | 4 +++ tests/xfs/1385 | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++ tests/xfs/1385.out | 4 +++ tests/xfs/group | 6 +++++ 13 files changed, 408 insertions(+) create mode 100755 tests/xfs/1380 create mode 100644 tests/xfs/1380.out create mode 100755 tests/xfs/1381 create mode 100644 tests/xfs/1381.out create mode 100755 tests/xfs/1382 create mode 100644 tests/xfs/1382.out create mode 100755 tests/xfs/1383 create mode 100644 tests/xfs/1383.out create mode 100755 tests/xfs/1384 create mode 100644 tests/xfs/1384.out create mode 100755 tests/xfs/1385 create mode 100644 tests/xfs/1385.out -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/tests/xfs/1380 b/tests/xfs/1380 new file mode 100755 index 0000000..6ce5cdf --- /dev/null +++ b/tests/xfs/1380 @@ -0,0 +1,63 @@ +#! /bin/bash +# FS QA Test No. 1380 +# +# Populate a XFS filesystem and fuzz every user dquot field. +# Use xfs_repair to fix the corruption. +# +#----------------------------------------------------------------------- +# Copyright (c) 2017 Oracle, Inc. All Rights Reserved. +# +# 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-1303 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 7 15 + +_cleanup() +{ + cd / + rm -rf $tmp.* +} + +# get standard environment, filters and checks +. ./common/rc +. ./common/filter +. ./common/populate +. ./common/fuzzy +. ./common/quota + +# real QA test starts here +_supported_os Linux +_supported_fs xfs +_require_scratch_xfs_fuzz_fields +_require_quota + +echo "Format and populate" +_scratch_populate_cached nofill > $seqres.full 2>&1 +echo "${MOUNT_OPTIONS}" | grep -q 'usrquota' || _notrun "user quota disabled" + +echo "Fuzz user 0 dquot" +_scratch_xfs_fuzz_metadata '' 'offline' "dquot -u 0" >> $seqres.full +echo "Done fuzzing dquot" + +# success, all done +status=0 +exit diff --git a/tests/xfs/1380.out b/tests/xfs/1380.out new file mode 100644 index 0000000..206445e --- /dev/null +++ b/tests/xfs/1380.out @@ -0,0 +1,4 @@ +QA output created by 1380 +Format and populate +Fuzz user 0 dquot +Done fuzzing dquot diff --git a/tests/xfs/1381 b/tests/xfs/1381 new file mode 100755 index 0000000..fc5bca9 --- /dev/null +++ b/tests/xfs/1381 @@ -0,0 +1,63 @@ +#! /bin/bash +# FS QA Test No. 1381 +# +# Populate a XFS filesystem and fuzz every user dquot field. +# Use xfs_scrub to fix the corruption. +# +#----------------------------------------------------------------------- +# Copyright (c) 2017 Oracle, Inc. All Rights Reserved. +# +# 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-1303 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 7 15 + +_cleanup() +{ + cd / + rm -rf $tmp.* +} + +# get standard environment, filters and checks +. ./common/rc +. ./common/filter +. ./common/populate +. ./common/fuzzy +. ./common/quota + +# real QA test starts here +_supported_os Linux +_supported_fs xfs +_require_scratch_xfs_fuzz_fields +_require_quota + +echo "Format and populate" +_scratch_populate_cached nofill > $seqres.full 2>&1 +echo "${MOUNT_OPTIONS}" | grep -q 'usrquota' || _notrun "user quota disabled" + +echo "Fuzz user 0 dquot" +_scratch_xfs_fuzz_metadata '' 'online' "dquot -u 0" >> $seqres.full +echo "Done fuzzing dquot" + +# success, all done +status=0 +exit diff --git a/tests/xfs/1381.out b/tests/xfs/1381.out new file mode 100644 index 0000000..f656609 --- /dev/null +++ b/tests/xfs/1381.out @@ -0,0 +1,4 @@ +QA output created by 1381 +Format and populate +Fuzz user 0 dquot +Done fuzzing dquot diff --git a/tests/xfs/1382 b/tests/xfs/1382 new file mode 100755 index 0000000..fd7e50d --- /dev/null +++ b/tests/xfs/1382 @@ -0,0 +1,63 @@ +#! /bin/bash +# FS QA Test No. 1380 +# +# Populate a XFS filesystem and fuzz every group dquot field. +# Use xfs_repair to fix the corruption. +# +#----------------------------------------------------------------------- +# Copyright (c) 2017 Oracle, Inc. All Rights Reserved. +# +# 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-1303 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 7 15 + +_cleanup() +{ + cd / + rm -rf $tmp.* +} + +# get standard environment, filters and checks +. ./common/rc +. ./common/filter +. ./common/populate +. ./common/fuzzy +. ./common/quota + +# real QA test starts here +_supported_os Linux +_supported_fs xfs +_require_scratch_xfs_fuzz_fields +_require_quota + +echo "Format and populate" +_scratch_populate_cached nofill > $seqres.full 2>&1 +echo "${MOUNT_OPTIONS}" | grep -q 'grpquota' || _notrun "group quota disabled" + +echo "Fuzz group 0 dquot" +_scratch_xfs_fuzz_metadata '' 'offline' "dquot -g 0" >> $seqres.full +echo "Done fuzzing dquot" + +# success, all done +status=0 +exit diff --git a/tests/xfs/1382.out b/tests/xfs/1382.out new file mode 100644 index 0000000..5350eb6 --- /dev/null +++ b/tests/xfs/1382.out @@ -0,0 +1,4 @@ +QA output created by 1382 +Format and populate +Fuzz group 0 dquot +Done fuzzing dquot diff --git a/tests/xfs/1383 b/tests/xfs/1383 new file mode 100755 index 0000000..0095b67 --- /dev/null +++ b/tests/xfs/1383 @@ -0,0 +1,63 @@ +#! /bin/bash +# FS QA Test No. 1383 +# +# Populate a XFS filesystem and fuzz every group dquot field. +# Use xfs_scrub to fix the corruption. +# +#----------------------------------------------------------------------- +# Copyright (c) 2017 Oracle, Inc. All Rights Reserved. +# +# 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-1303 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 7 15 + +_cleanup() +{ + cd / + rm -rf $tmp.* +} + +# get standard environment, filters and checks +. ./common/rc +. ./common/filter +. ./common/populate +. ./common/fuzzy +. ./common/quota + +# real QA test starts here +_supported_os Linux +_supported_fs xfs +_require_scratch_xfs_fuzz_fields +_require_quota + +echo "Format and populate" +_scratch_populate_cached nofill > $seqres.full 2>&1 +echo "${MOUNT_OPTIONS}" | grep -q 'grpquota' || _notrun "group quota disabled" + +echo "Fuzz group 0 dquot" +_scratch_xfs_fuzz_metadata '' 'online' "dquot -g 0" >> $seqres.full +echo "Done fuzzing dquot" + +# success, all done +status=0 +exit diff --git a/tests/xfs/1383.out b/tests/xfs/1383.out new file mode 100644 index 0000000..3af271b --- /dev/null +++ b/tests/xfs/1383.out @@ -0,0 +1,4 @@ +QA output created by 1383 +Format and populate +Fuzz group 0 dquot +Done fuzzing dquot diff --git a/tests/xfs/1384 b/tests/xfs/1384 new file mode 100755 index 0000000..53b0450 --- /dev/null +++ b/tests/xfs/1384 @@ -0,0 +1,63 @@ +#! /bin/bash +# FS QA Test No. 1384 +# +# Populate a XFS filesystem and fuzz every project dquot field. +# Use xfs_repair to fix the corruption. +# +#----------------------------------------------------------------------- +# Copyright (c) 2017 Oracle, Inc. All Rights Reserved. +# +# 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-1303 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 7 15 + +_cleanup() +{ + cd / + rm -rf $tmp.* +} + +# get standard environment, filters and checks +. ./common/rc +. ./common/filter +. ./common/populate +. ./common/fuzzy +. ./common/quota + +# real QA test starts here +_supported_os Linux +_supported_fs xfs +_require_scratch_xfs_fuzz_fields +_require_quota + +echo "Format and populate" +_scratch_populate_cached nofill > $seqres.full 2>&1 +echo "${MOUNT_OPTIONS}" | grep -q 'prjquota' || _notrun "project quota disabled" + +echo "Fuzz project 0 dquot" +_scratch_xfs_fuzz_metadata '' 'offline' "dquot -p 0" >> $seqres.full +echo "Done fuzzing dquot" + +# success, all done +status=0 +exit diff --git a/tests/xfs/1384.out b/tests/xfs/1384.out new file mode 100644 index 0000000..0bba74e --- /dev/null +++ b/tests/xfs/1384.out @@ -0,0 +1,4 @@ +QA output created by 1384 +Format and populate +Fuzz project 0 dquot +Done fuzzing dquot diff --git a/tests/xfs/1385 b/tests/xfs/1385 new file mode 100755 index 0000000..f6fc7b7 --- /dev/null +++ b/tests/xfs/1385 @@ -0,0 +1,63 @@ +#! /bin/bash +# FS QA Test No. 1385 +# +# Populate a XFS filesystem and fuzz every project dquot field. +# Use xfs_scrub to fix the corruption. +# +#----------------------------------------------------------------------- +# Copyright (c) 2017 Oracle, Inc. All Rights Reserved. +# +# 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-1303 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 7 15 + +_cleanup() +{ + cd / + rm -rf $tmp.* +} + +# get standard environment, filters and checks +. ./common/rc +. ./common/filter +. ./common/populate +. ./common/fuzzy +. ./common/quota + +# real QA test starts here +_supported_os Linux +_supported_fs xfs +_require_scratch_xfs_fuzz_fields +_require_quota + +echo "Format and populate" +_scratch_populate_cached nofill > $seqres.full 2>&1 +echo "${MOUNT_OPTIONS}" | grep -q 'prjquota' || _notrun "project quota disabled" + +echo "Fuzz project 0 dquot" +_scratch_xfs_fuzz_metadata '' 'online' "dquot -p 0" >> $seqres.full +echo "Done fuzzing dquot" + +# success, all done +status=0 +exit diff --git a/tests/xfs/1385.out b/tests/xfs/1385.out new file mode 100644 index 0000000..e980490 --- /dev/null +++ b/tests/xfs/1385.out @@ -0,0 +1,4 @@ +QA output created by 1385 +Format and populate +Fuzz project 0 dquot +Done fuzzing dquot diff --git a/tests/xfs/group b/tests/xfs/group index ffdb061..079dc48 100644 --- a/tests/xfs/group +++ b/tests/xfs/group @@ -421,3 +421,9 @@ 421 auto quick clone dedupe 422 dangerous_scrub dangerous_online_repair 423 dangerous_scrub +1380 dangerous_fuzzers dangerous_scrub dangerous_repair +1381 dangerous_fuzzers dangerous_scrub dangerous_online_repair +1382 dangerous_fuzzers dangerous_scrub dangerous_repair +1383 dangerous_fuzzers dangerous_scrub dangerous_online_repair +1384 dangerous_fuzzers dangerous_scrub dangerous_repair +1385 dangerous_fuzzers dangerous_scrub dangerous_online_repair