From patchwork Mon Oct 9 08:16:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eryu Guan X-Patchwork-Id: 9992265 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 301AB60244 for ; Mon, 9 Oct 2017 08:17:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2124F28676 for ; Mon, 9 Oct 2017 08:17:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 15FDD28692; Mon, 9 Oct 2017 08:17:02 +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 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 A04FD28676 for ; Mon, 9 Oct 2017 08:17:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751068AbdJIIRB (ORCPT ); Mon, 9 Oct 2017 04:17:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48152 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750795AbdJIIRA (ORCPT ); Mon, 9 Oct 2017 04:17:00 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4D9B64E4D4 for ; Mon, 9 Oct 2017 08:17:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4D9B64E4D4 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=eguan@redhat.com Received: from localhost (ovpn-12-154.pek2.redhat.com [10.72.12.154]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6ED296A741; Mon, 9 Oct 2017 08:16:59 +0000 (UTC) Date: Mon, 9 Oct 2017 16:16:57 +0800 From: Eryu Guan To: fstests@vger.kernel.org Cc: Eryu Guan Subject: [PATCH RESEND] check: source common/rc again if TEST_DEV was recreated Message-ID: <20171009081657.GF10593@eguan.usersys.redhat.com> References: <20170802143915.19585-1-eguan@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20170802143915.19585-1-eguan@redhat.com> User-Agent: Mutt/1.9.1 (2017-09-22) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 09 Oct 2017 08:17:00 +0000 (UTC) Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If TEST_DEV is recreated by check, FSTYP derived from TEST_DEV previously could be changed too and might not reflect the reality. So source common/rc again with correct FSTYP to get fs-specific configs, e.g. common/xfs. For example, using this config-section config file, and run section ext4 first then xfs, you can see: our local _scratch_mkfs routine ... ./common/rc: line 825: _scratch_mkfs_xfs: command not found check: failed to mkfs $SCRATCH_DEV using specified options local.config: [default] RECREATE_TEST_DEV=true TEST_DEV=/dev/sda5 SCRATCH_DEV=/dev/sda6 TEST_DIR=/mnt/test SCRATCH_MNT=/mnt/scratch [ext4] MKFS_OPTIONS="-b 4096" FSTYP=ext4 [xfs] FSTYP=xfs MKFS_OPTIONS="-f -b size=4k" Signed-off-by: Eryu Guan --- check | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/check b/check index f8db3cd6dfab..07586ce463c4 100755 --- a/check +++ b/check @@ -555,6 +555,10 @@ for section in $HOST_OPTIONS_SECTIONS; do status=1 exit fi + # TEST_DEV has been recreated, previous FSTYP derived from + # TEST_DEV could be changed, source common/rc again with + # correct FSTYP to get FSTYP specific configs, e.g. common/xfs + . common/rc _prepare_test_list elif [ "$OLD_TEST_FS_MOUNT_OPTS" != "$TEST_FS_MOUNT_OPTS" ]; then _test_unmount 2> /dev/null