From patchwork Mon Jul 30 07:42:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zorro Lang X-Patchwork-Id: 10548601 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 1D5BD13B8 for ; Mon, 30 Jul 2018 07:42:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 100D5295D6 for ; Mon, 30 Jul 2018 07:42:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 04A712986C; Mon, 30 Jul 2018 07:42:12 +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 A2455295D6 for ; Mon, 30 Jul 2018 07:42:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726534AbeG3JPv (ORCPT ); Mon, 30 Jul 2018 05:15:51 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:48212 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726481AbeG3JPv (ORCPT ); Mon, 30 Jul 2018 05:15:51 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 782744001388 for ; Mon, 30 Jul 2018 07:42:10 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-12-115.pek2.redhat.com [10.72.12.115]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4AB8E10C1E for ; Mon, 30 Jul 2018 07:42:07 +0000 (UTC) From: Zorro Lang To: fstests@vger.kernel.org Subject: [PATCH] xfs/288: _notrun if xfs_db write doesn't support -d option Date: Mon, 30 Jul 2018 15:42:02 +0800 Message-Id: <20180730074202.26450-1-zlang@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 30 Jul 2018 07:42:10 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 30 Jul 2018 07:42:10 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'zlang@redhat.com' RCPT:'' Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Commit b3cf8b72334fd35ef961869506e5a72ab398bc82 help xfs/288 to support v5 filesystems testing, but there're still some old distributions don't support xfs_db 'write -d' usage. Then this case fails on them. For compatible with older versions, skip this test on v5 xfs if xfs_db write command doesn't support -d option. Signed-off-by: Zorro Lang --- tests/xfs/288 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/xfs/288 b/tests/xfs/288 index bccdb6fc..f8e117ed 100755 --- a/tests/xfs/288 +++ b/tests/xfs/288 @@ -40,6 +40,14 @@ _require_attrs _scratch_mkfs_xfs 2>/dev/null | _filter_mkfs 2>$tmp.mkfs >/dev/null . $tmp.mkfs +# Require write -d option to write invalid data into V5 filesystem +if [ $_fs_has_crcs -eq 1 ]; then + _scratch_xfs_db -x -c "help write" | egrep -q "(-d)" + if [ $? -ne 0 ]; then + _notrun "xfs_db write doesn't support -d option" + fi +fi + _scratch_mount touch $SCRATCH_MNT/$seq.attrfile