From patchwork Fri Jan 26 07:59:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amir Goldstein X-Patchwork-Id: 10185233 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 751AE60383 for ; Fri, 26 Jan 2018 07:58:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6914B290E8 for ; Fri, 26 Jan 2018 07:58:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5DEA0290EC; Fri, 26 Jan 2018 07:58:13 +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.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, 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 055E9290E8 for ; Fri, 26 Jan 2018 07:58:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752113AbeAZH6M (ORCPT ); Fri, 26 Jan 2018 02:58:12 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:46481 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751852AbeAZH6L (ORCPT ); Fri, 26 Jan 2018 02:58:11 -0500 Received: by mail-wm0-f67.google.com with SMTP id 143so19128781wma.5; Thu, 25 Jan 2018 23:58:10 -0800 (PST) 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=h/N6Oqm7Qb0X8mZwU+qL+FAkXOEqWWNaAgx7ZIVx9o8=; b=PwMDYVzyKxR5zbSMNFVZOzXPm6CFQ4fkvGIkfxiPfnnDthnuWjZJwIxssuGS2zBqMm d4aeHSE6KWyUfVnbjh615XktgQemde4iXflHGJU7UwTgSSQnfviz6qRdh7w44fNs9v93 HUMaxj/c4/L0ng3iYZShr5z3UuBlpbNYXkjX819BCZlWrkM5yiMsZ/sEZMv+494ijdUk UHCkOgyNFrd/9Vdi7SCX4BFFlLm8t71oOZpX7D/EBVNuS2nMDkWYiaNfx1MsYNRQ9UjC wfRs771cCbO8E8uXxE/kMTz1sWtyWcOxWVknM/EQfvzrpGEAfR9VJQl4yTBDA2PSInXs pxZw== 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=h/N6Oqm7Qb0X8mZwU+qL+FAkXOEqWWNaAgx7ZIVx9o8=; b=aEK60Q+tBa9SIdgHqEGwNUMrbbRqUm2kRCriUBgNXKEhmXpZEYFG/PNxdOIonS8pWu wGtfnnT2uxH884eN3uYhJpO9jBIQaLzOjZKx4u3p14NYgCZka4CsMiFXZrTc0JK+CtgD wYlsKo7P1a5fop7+nYHKDivj2DgmmDvXlrXq7yL+mlkaO81E1DBuGDiT62pwnV1+RcDa 04AWVUCwkrdh9p+BURafH/DgH+l84P/saKqThSbd//jMfMdSi2TDlTx5NTKskojKKy+7 WPjZzZbkudvax8rJnP6XYiCZl0I6H3Z2pFRtlbJTweKVs5QT4W2Q/y/AzfKVFvf6jfnA 8GOg== X-Gm-Message-State: AKwxytesP68X49teE0vRKsA8iW4QWBgpBV1nhbmT8U/330t1KJ6iteoo 3yYJGPbXvUvgJfit+L45gPc= X-Google-Smtp-Source: AH8x227te+qz4EaU6EVrc2n5NevQc6Y9DjxLgFiczR6YGzE0AZsm/kN5kSoYtLIcMGMMEpnxe78jqA== X-Received: by 10.28.190.3 with SMTP id o3mr10717172wmf.17.1516953490307; Thu, 25 Jan 2018 23:58:10 -0800 (PST) Received: from localhost.localdomain ([141.226.162.233]) by smtp.gmail.com with ESMTPSA id 44sm10088261wrv.0.2018.01.25.23.58.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 25 Jan 2018 23:58:09 -0800 (PST) From: Amir Goldstein To: Eryu Guan Cc: zhangyi , Miklos Szeredi , linux-unionfs@vger.kernel.org, fstests@vger.kernel.org Subject: [PATCH 2/4] overlay/036: fix upper/lower dir mismatch Date: Fri, 26 Jan 2018 09:59:06 +0200 Message-Id: <1516953548-15679-3-git-send-email-amir73il@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516953548-15679-1-git-send-email-amir73il@gmail.com> References: <1516953548-15679-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 Mount option index=on checks on mount that upper dir is not being reused with a different lower dir than the first lower dir it was mounted with. This behavior is verified by test overlay/037. In this test however, it is not desired to fail mount on mismatch of upper/lower, so use the matching upper/lower dirs in this test. The mismatch went unnoticed because the index=off mounts do not verify lower dir and the index=on mounts fails on EBUSY (dir in use by another live mount) before failing on ESTALE (upper/lower dir mismatch). Never the less, fix the mismatch, so a change in the kernel between the two sanity checks (EBUSY vs. ESTALE) won't break the test. Signed-off-by: Amir Goldstein --- tests/overlay/036 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/overlay/036 b/tests/overlay/036 index e0c13ae..e04aaee 100755 --- a/tests/overlay/036 +++ b/tests/overlay/036 @@ -90,7 +90,7 @@ _overlay_mount_dirs $lowerdir $upperdir $workdir \ # Try to mount another overlay with the same upperdir # with index=off - expect success -_overlay_mount_dirs $lowerdir2 $upperdir $workdir2 \ +_overlay_mount_dirs $lowerdir $upperdir $workdir2 \ overlay0 $SCRATCH_MNT -oindex=off && \ $UMOUNT_PROG $SCRATCH_MNT @@ -102,7 +102,7 @@ _overlay_mount_dirs $lowerdir2 $upperdir2 $workdir \ # Try to mount another overlay with the same upperdir # with index=on - expect EBUSY -_overlay_mount_dirs $lowerdir2 $upperdir $workdir2 \ +_overlay_mount_dirs $lowerdir $upperdir $workdir2 \ overlay2 $SCRATCH_MNT -oindex=on 2>&1 | _filter_busy_mount # Try to mount another overlay with the same workdir