From patchwork Mon Nov 5 17:25:47 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: 10668799 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 1E22C1751 for ; Mon, 5 Nov 2018 17:25:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 03DB02994F for ; Mon, 5 Nov 2018 17:25:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EC08629922; Mon, 5 Nov 2018 17:25:51 +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 A23E029A86 for ; Mon, 5 Nov 2018 17:25:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387530AbeKFCqb (ORCPT ); Mon, 5 Nov 2018 21:46:31 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:39350 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387420AbeKFCqb (ORCPT ); Mon, 5 Nov 2018 21:46:31 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wA5HMnIY124239; Mon, 5 Nov 2018 17:25:48 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : mime-version : content-type; s=corp-2018-07-02; bh=wrJMcI7wpT5okHp+kyMIVHkkCnanXkwVZQzEyJeuvEA=; b=bODlUxVNo33Q8sMzBha4UIsIgwlq0RO0uwA4y+hffctfGGFRSM5kXSJYU7/Pi1GERfMi kpO3X2Yc8Oyjmfrmgx6OitQOQp+xYMwGxdCzox8h3PTlLy/l1yU5emFq84i47/LxLYkP cDz0PGsMpL537M9YdFBlI4s/gf6W1JYaD7XiNM2Bsz5rmJcyeC/s6tPMasMBZ8xrzWLO d4nkbbhSlled5XHSR46IS7Y2wXKK6M2vbETi05LOs1iGKBu29/gJ6PMaFRDy/MEyO1FR 31ctPfPYts/XNFHhJ0rWVgzhoVPFQCZrFdqfPIiOCQcZ2TlJVMjDPtgtGK8MVBcZSpqv ag== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2130.oracle.com with ESMTP id 2nh33trcf7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 05 Nov 2018 17:25:47 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id wA5HPlP9013196 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 5 Nov 2018 17:25:47 GMT Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id wA5HPkFC005718; Mon, 5 Nov 2018 17:25:46 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 05 Nov 2018 09:25:46 -0800 Date: Mon, 5 Nov 2018 09:25:47 -0800 From: "Darrick J. Wong" To: Eryu Guan Cc: fstests , xfs Subject: [PATCH] populate: fix leafn creation test for v4 filesystems Message-ID: <20181105172547.GD4131@magnolia> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9068 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=787 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1811050156 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Darrick J. Wong The leafn creation test doesn't work on some v4 filesystems because the field names change. Rearrange the code somewhat so that it works properly. Signed-off-by: Darrick J. Wong --- common/populate | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/populate b/common/populate index 610425f9..d49fbc29 100644 --- a/common/populate +++ b/common/populate @@ -444,7 +444,9 @@ __populate_check_xfs_dir() { (test "${datab}" -eq 1 && test "${leafb}" -eq 1 && test "${freeb}" -eq 0) || _fail "failed to create ${dtype} dir ino ${inode} datab ${datab} leafb ${leafb} freeb ${freeb}" ;; "leafn") - _scratch_xfs_db -x -c "inode ${inode}" -c "dblock ${leaf_lblk}" -c "p lhdr.info.hdr.magic" | egrep -q '(0x3dff|0xd2ff)' || _fail "failed to create ${dtype} dir ino ${inode} datab ${datab} leafb ${leafb} freeb ${freeb}" + _scratch_xfs_db -x -c "inode ${inode}" -c "dblock ${leaf_lblk}" -c "p lhdr.info.hdr.magic" | grep -q '0x3dff' && return + _scratch_xfs_db -x -c "inode ${inode}" -c "dblock ${leaf_lblk}" -c "p lhdr.info.magic" | grep -q '0xd2ff' && return + _fail "failed to create ${dtype} dir ino ${inode} datab ${datab} leafb ${leafb} freeb ${freeb}" ;; "node"|"btree") (test "${datab}" -eq 1 && test "${leafb}" -eq 1 && test "${freeb}" -eq 1) || _fail "failed to create ${dtype} dir ino ${inode} datab ${datab} leafb ${leafb} freeb ${freeb}"