From patchwork Fri Oct 5 00:19:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10627079 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C862E1926 for ; Fri, 5 Oct 2018 00:19:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BAC2B292FD for ; Fri, 5 Oct 2018 00:19:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AEC3629301; Fri, 5 Oct 2018 00:19:43 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable 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 6AEF9292FD for ; Fri, 5 Oct 2018 00:19:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727564AbeJEHPn (ORCPT ); Fri, 5 Oct 2018 03:15:43 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:56414 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726038AbeJEHPn (ORCPT ); Fri, 5 Oct 2018 03:15:43 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w950JeD5179011; Fri, 5 Oct 2018 00:19:40 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=JjIXCO9y0z2w1NFGAOSESk+TrgIEmCz5t/NI0GebQr4=; b=zPhSOcfVeH9tSG9t5XL3126ltf5VN+FTjKVCOVAo3tJf/LJersP3XURxPsq/0gh9fpDz 4s01M83Y1vZmpGMxhJsP654pReTcd7SesA804IVFNseDyqMJp0kW2f5RCqEwCM8tHSA8 QWXB0A+r8stLb6fiYwaaxQe1i+OrhmlyNsk/SDJP3W/8ot0z3U1AdSb1MlzeXb7yZE/x meun5M6bmKY+FrLLfmj4xS7DqPHGnF1xrhJwTW7tUeFOWNaulFhlYVN/wmbNHYqrgE1C EU4eUcw8xq+oyPTN4Utz2MxPc8a/phA6zN5Imyqhw5obyok2uBxthGbZ5IJdrqZOsQNY 0g== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2120.oracle.com with ESMTP id 2mt21rfgxk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 05 Oct 2018 00:19:40 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w950JYD3004850 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 5 Oct 2018 00:19:34 GMT Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w950JYYF030420; Fri, 5 Oct 2018 00:19:34 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 05 Oct 2018 00:19:34 +0000 Subject: [PATCH 4/6] xfs/270: use _scratch_xfs_set_metadata_field to fuzz rocompat bits From: "Darrick J. Wong" To: guaneryu@gmail.com, darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, fstests@vger.kernel.org Date: Thu, 04 Oct 2018 17:19:33 -0700 Message-ID: <153869877319.26648.6762297729048228417.stgit@magnolia> In-Reply-To: <153869874763.26648.516233620615833277.stgit@magnolia> References: <153869874763.26648.516233620615833277.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9036 signatures=668706 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=756 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810050002 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Darrick J. Wong Use the helper to set the metadata field so that we can bypass write verifier checks. Signed-off-by: Darrick J. Wong Reviewed-by: Xiao Yang --- tests/xfs/270 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/xfs/270 b/tests/xfs/270 index da66bc33..fb72ba7c 100755 --- a/tests/xfs/270 +++ b/tests/xfs/270 @@ -44,8 +44,8 @@ _scratch_mkfs_xfs >>$seqres.full 2>&1 # set the highest bit of features_ro_compat, use it as an unknown # feature bit. If one day this bit become known feature, please # change this case. -$XFS_DB_PROG -x -c "sb 0" -c "write -d features_ro_compat $((2**31))" \ - $SCRATCH_DEV | grep -v "Allowing write of corrupted data" +_scratch_xfs_set_metadata_field "features_ro_compat" "$((2**31))" "sb 0" | \ + grep 'features_ro_compat' # rw mount with unknown ro-compat feature should fail echo "rw mount test"