From patchwork Wed Sep 27 07:04:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amir Goldstein X-Patchwork-Id: 9973233 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 D3B0C6037F for ; Wed, 27 Sep 2017 07:03:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C903C290CB for ; Wed, 27 Sep 2017 07:03:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BDF02290D2; Wed, 27 Sep 2017 07:03: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=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 5AAFD290CB for ; Wed, 27 Sep 2017 07:03:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751396AbdI0HDu (ORCPT ); Wed, 27 Sep 2017 03:03:50 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:33954 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751436AbdI0HDq (ORCPT ); Wed, 27 Sep 2017 03:03:46 -0400 Received: by mail-wm0-f65.google.com with SMTP id i131so10587969wma.1; Wed, 27 Sep 2017 00:03:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=HzklnlvFaaJ5/nDXKq6c4ZBzt2AnMmgqxmBHo2yW88Y=; b=aDtyipZUG5v2w8bxX2qCM31NTugG3ohrAcWzaKCYW9nFSFUuqqHHGCA/yw6+4jnyIO 7trXWux9P8m4fSCsuWH8ubKMgU/q6WHV8Z1//UTAXU5VPuXQaCyDPJSissWIZbKwnolf 2nujuRno/e3o+dFlbc7ixpFrJmI1M59jMGRw7gmShN5nbnzcByLx5pOvJssNPDu4T4Uc s2l8A8Ne7c/o6sPViW+dx0hqX7Z1QQFFSgIIwbFei5CQDX8wEKPbdg+CloO2tMAFp0bf h9rX8zPx7CpbS9yTIGLdkjiG19ufbuUxOpd+QNnoV2dHb10ZdY47dcAmflZDjCRy/RML JC6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=HzklnlvFaaJ5/nDXKq6c4ZBzt2AnMmgqxmBHo2yW88Y=; b=I2Ln8tVc+J/sw1siuviNpAkgNUepXrIuN6J71da3OUuur2frz+3xoD41YssQpDknTX oPak41UBTF8Li7mQG3r2+rCRwfvWXF2mcFXCG4ySD1k9Z3ze2U4XAsHp241n+ERd7mmK LbhiTwZelwZNZoULQKGoDqwXtvcF8/GddiRJQcRughZTSpVl181UQvwmUMHc5KnMEZl4 Yz94VuUQCP5MqSkB3uQ85nHqai4Zt7HDMPWgzNV81r3VP+Dix3PkqL+ZuV08wfFRfaNx 5PqekCnt7q4iy+QX+dEonW2Vi4uHQZpPPlM8WJi5FS8XbV0ZiUOVnRu4PzW8KdyeTbBa 5Q2A== X-Gm-Message-State: AHPjjUgA5SGMUaMrilOe4vBU9kiqcgFEuIMXPyQb9fg2Mt+o3z6OJimC fcYx6CygKhNcr/ZsKfqbJ+w= X-Google-Smtp-Source: AOwi7QARAGduTZKeGAYjBaJiPVcyc4vlKFDmN42Cdap3ZmBB0U4Y7+/LzFi70kDBESbuoK8acDL/Ig== X-Received: by 10.28.38.69 with SMTP id m66mr570636wmm.34.1506495824831; Wed, 27 Sep 2017 00:03:44 -0700 (PDT) Received: from localhost.localdomain (bzq-166-168-31-246.red.bezeqint.net. [31.168.166.246]) by smtp.gmail.com with ESMTPSA id m4sm9239535wrb.35.2017.09.27.00.03.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 27 Sep 2017 00:03:44 -0700 (PDT) From: Amir Goldstein To: Eryu Guan Cc: Miklos Szeredi , linux-unionfs@vger.kernel.org, fstests@vger.kernel.org Subject: [PATCH 4/4] overlay: fix _overlay_config_override of MOUNT_OPTIONS Date: Wed, 27 Sep 2017 10:04:12 +0300 Message-Id: <1506495852-7295-5-git-send-email-amir73il@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506495852-7295-1-git-send-email-amir73il@gmail.com> References: <1506495852-7295-1-git-send-email-amir73il@gmail.com> Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The config variable OVERLAY_MOUNT_OPTIONS is used to configure the overlay mount options when running ./check -overlay. The config variable MOUNT_OPTIONS is used to configure the mount options for base fs. If config sets value of OVERLAY_MOUNT_OPTIONS and does not set MOUNT_OPTIONS, the value of MOUNT_OPTIONS may be leftover from previous _overlay_config_override, so don't use that value for base fs mount. Signed-off-by: Amir Goldstein --- common/config | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/config b/common/config index 71798f0..8844173 100644 --- a/common/config +++ b/common/config @@ -532,6 +532,10 @@ _overlay_config_override() # Store original base fs vars export OVL_BASE_TEST_DEV="$TEST_DEV" export OVL_BASE_TEST_DIR="$TEST_DIR" + # If config does not set MOUNT_OPTIONS, its value may be + # leftover from previous _overlay_config_override, so + # don't use that value for base fs mount + [ "$MOUNT_OPTIONS" != "$OVERLAY_MOUNT_OPTIONS" ] || unset MOUNT_OPTIONS export OVL_BASE_MOUNT_OPTIONS="$MOUNT_OPTIONS" # Set TEST vars to overlay base and mount dirs inside base fs