From patchwork Sun Jul 29 14:20:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zorro Lang X-Patchwork-Id: 10548263 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 64D26139A for ; Sun, 29 Jul 2018 14:21:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 494CB2A263 for ; Sun, 29 Jul 2018 14:21:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3BF542A293; Sun, 29 Jul 2018 14:21:03 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 250AC2A263 for ; Sun, 29 Jul 2018 14:21:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728614AbeG2Pvh (ORCPT ); Sun, 29 Jul 2018 11:51:37 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:57372 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726606AbeG2Pvh (ORCPT ); Sun, 29 Jul 2018 11:51:37 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7488487A70; Sun, 29 Jul 2018 14:21:00 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-12-84.pek2.redhat.com [10.72.12.84]) by smtp.corp.redhat.com (Postfix) with ESMTP id DD4552156701; Sun, 29 Jul 2018 14:20:58 +0000 (UTC) From: Zorro Lang To: fstests@vger.kernel.org Cc: linux-xfs@vger.kernel.org Subject: [PATCH] xfs/288: use -d option of xfs_db write command for v5 XFS Date: Sun, 29 Jul 2018 22:20:53 +0800 Message-Id: <20180729142053.4240-1-zlang@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Sun, 29 Jul 2018 14:21:00 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Sun, 29 Jul 2018 14:21:00 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'zlang@redhat.com' RCPT:'' 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 The commit b3cf8b72334fd35ef961869506e5a72ab398bc82 update xfs/288 to support v5 filesystem testing. That commit thought xfs_db write command can work well with -d option on V5 XFS. But the truth is the case doesn't use that option. So turn to use _scratch_xfs_set_metadata_field, it will help to use proper options for xfs_db write command. Signed-off-by: Zorro Lang Reviewed-by: Darrick J. Wong --- Hi, Missing '-d' option is a case issue. But from this issue, we found another bug of xfsprogs. On current upstream, this case will test pass on v5 XFS, even there's not '-d' option for write command. That's a bug, we'll fix it later. For now, I'd like to fix this case issue at first. Thanks, Zorro tests/xfs/288 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/xfs/288 b/tests/xfs/288 index bccdb6fc..f4165b6c 100755 --- a/tests/xfs/288 +++ b/tests/xfs/288 @@ -56,9 +56,8 @@ $SETFATTR_PROG -n "user.testattr${seq}" \ _scratch_unmount # manually corrupt the XFS, by set the header count of attr to 0 -_scratch_xfs_db -x -c "inode $inum" \ - -c "ablock 0" \ - -c "write hdr.count 0" >> $seqres.full +_scratch_xfs_set_metadata_field "hdr.count" "0" \ + "inode $inum" "ablock 0" >> $seqres.full # make sure xfs_repair can find above corruption. If it can't, that # means we need to fix this bug on current xfs_repair