From patchwork Tue Apr 8 15:42:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Czerner X-Patchwork-Id: 3949691 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DDBD4BFF02 for ; Tue, 8 Apr 2014 15:43:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1DB16203B8 for ; Tue, 8 Apr 2014 15:43:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 38802203B7 for ; Tue, 8 Apr 2014 15:43:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757481AbaDHPnF (ORCPT ); Tue, 8 Apr 2014 11:43:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51030 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757459AbaDHPnD (ORCPT ); Tue, 8 Apr 2014 11:43:03 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s38FgvTE013327 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 8 Apr 2014 11:42:58 -0400 Received: from localhost.localdomain.com (dhcp-1-245.brq.redhat.com [10.34.1.245]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s38FgrQ7022692; Tue, 8 Apr 2014 11:42:56 -0400 From: Lukas Czerner To: xfs@oss.sgi.com Cc: linux-btrfs@vger.kernel.org, fdmanana@gmail.com, david@fromorbit.com, Lukas Czerner Subject: [PATCH 2/3] xfstests: Unset SCRATCH_DEV when deduced from SCRATCH_DEV_POOL Date: Tue, 8 Apr 2014 17:42:49 +0200 Message-Id: <1396971770-23553-2-git-send-email-lczerner@redhat.com> In-Reply-To: <1396971770-23553-1-git-send-email-lczerner@redhat.com> References: <20140404211224.GX17603@dastard> <1396971770-23553-1-git-send-email-lczerner@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In the case that we already have sections in the config file we have to make sure that we unset SCRATCH_DEV if it has been deduced from the SCRATCH_DEV_POOL so that it does not complain about SCRATCH_DEV in this case. Signed-off-by: Lukas Czerner Tested-by: Filipe David Manana --- common/config | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/common/config b/common/config index 6fa18e2..3163801 100644 --- a/common/config +++ b/common/config @@ -372,10 +372,15 @@ get_next_config() { unset MOUNT_OPTIONS unset MKFS_OPTIONS unset FSCK_OPTIONS + # We might have deduced SCRATCH_DEV from the SCRATCH_DEV_POOL in the previous + # run, so we have to unset it now. + if [ "$SCRATCH_DEV_NOT_SET" == "true" ]; then + unset SCRATCH_DEV + fi parse_config_section $1 - if [ -n "$OLD_FSTYP" ] && [ $OLD_FSTYP != $FSTYP ]; then + if [ ! -z "$OLD_FSTYP" ] && [ $OLD_FSTYP != $FSTYP ]; then [ -z "$MOUNT_OPTIONS" ] && _mount_opts [ -z "$MKFS_OPTIONS" ] && _mkfs_opts [ -z "$FSCK_OPTIONS" ] && _fsck_opts @@ -423,6 +428,7 @@ get_next_config() { fi SCRATCH_DEV=`echo $SCRATCH_DEV_POOL | awk '{print $1}'` export SCRATCH_DEV + export SCRATCH_DEV_NOT_SET=true fi echo $SCRATCH_DEV | grep -q ":" > /dev/null 2>&1