From patchwork Fri Jan 26 07:59:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amir Goldstein X-Patchwork-Id: 10185235 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 235F760383 for ; Fri, 26 Jan 2018 07:58:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 174A4290E8 for ; Fri, 26 Jan 2018 07:58:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0BE7D290EC; Fri, 26 Jan 2018 07:58:15 +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 A22C1290E8 for ; Fri, 26 Jan 2018 07:58:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752134AbeAZH6O (ORCPT ); Fri, 26 Jan 2018 02:58:14 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:37395 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752119AbeAZH6N (ORCPT ); Fri, 26 Jan 2018 02:58:13 -0500 Received: by mail-wm0-f67.google.com with SMTP id v71so19363761wmv.2; Thu, 25 Jan 2018 23:58:12 -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=nvnleQQfPDcL54o0Lcaw7mkqiZU71h0F02NqxdPmLOQ=; b=LPYK4aGlgnhE3QbnJNyc9u02ynQ8FVaEHKvD643GOU4ovdYbZSLoGAqhRhCnfphg1o ZrD7MElkZ/JbCdBlZSHbtzgo1Zc8tqc0JWlOlH9s3c+iLIwL/blwqLbcIGTS34Rtf8M1 INzhiHafhM8g6mmnpWNkaesE3q7vLwez09Hix4K4izaD4P/TFCKUhJGhONW1wPsAM/kG rNcgSsznfHSdMnQ1/uvoFXoUV8cylG5OBLzqh3oqUJ6FoI9aROuzKLy34DlCIMlAO5rJ xcK1Xq/ROJZbwwTllBX5qF4rnZg0xvJsIr18ddA9NTIoi476Atvol4if3c53DlqeZ2jm XcLA== 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=nvnleQQfPDcL54o0Lcaw7mkqiZU71h0F02NqxdPmLOQ=; b=jDG5kChkFn+yha7A9ycF9SW2JRWIOBmEeGS3M8MQJYQLhGuTFkmU+Gf/GtE/OXIR8b cr72kkev9o7qGrZCKcsX+XfGhjTLuIdo2nIioBLdesTz7cwbqYZWKssNmcE4q6YsAzCH lTCyiIMTnBrsWTsBBw7dZqRb6+qpbSKh9Rw2jOu0lSKCV3JDqdklvpWaxIabDMvxmJvB P3X4aY4EbbC2cCGVZsCjPM8lerloLVF2DiPvHU+kU4nKFdUB2l/xo/8hpyJ+iJ1vPCKf LDETUmaWsiNUqCp/FpFhP3fezgOCOb0UgyKMVkR2a1FF3lG9EJALqFzpN1W6ckf5hCun +zyg== X-Gm-Message-State: AKwxyteR1PMacgVLNFUF45JIp+/oxWo12Biy+kbuKXZ95C91vAsD6iGW 8wnrXK4J/WFaxJCnfQyHgJM= X-Google-Smtp-Source: AH8x226IXUWEpGYtDsSDTVa8yaMWRNUtW6HNW2i5PlYp7do8dOWN2Lhe8JrJZQunF4EI6xNza7zP6w== X-Received: by 10.28.167.5 with SMTP id q5mr10686155wme.90.1516953491555; Thu, 25 Jan 2018 23:58:11 -0800 (PST) Received: from localhost.localdomain ([141.226.162.233]) by smtp.gmail.com with ESMTPSA id 44sm10088261wrv.0.2018.01.25.23.58.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 25 Jan 2018 23:58:11 -0800 (PST) From: Amir Goldstein To: Eryu Guan Cc: zhangyi , Miklos Szeredi , linux-unionfs@vger.kernel.org, fstests@vger.kernel.org Subject: [PATCH 3/4] overlay: consider index dir with whiteouts clean Date: Fri, 26 Jan 2018 09:59:07 +0200 Message-Id: <1516953548-15679-4-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 Several tests check that index dir is empty after upper entries have been unlinked. With nfs_export=on, index will contain a whiteout index entry in that case so, allow chardevs when checking for clean index dir. Signed-off-by: Amir Goldstein --- tests/overlay/033 | 8 ++++++-- tests/overlay/034 | 8 ++++++-- tests/overlay/048 | 4 +++- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/tests/overlay/033 b/tests/overlay/033 index 30780c6..3e67500 100755 --- a/tests/overlay/033 +++ b/tests/overlay/033 @@ -69,7 +69,6 @@ report_nlink() # Create lower hardlinks create_hardlinks() { - lowerdir=$OVL_BASE_SCRATCH_MNT/$OVL_LOWER mkdir -p $lowerdir touch $lowerdir/0 ln $lowerdir/0 $lowerdir/1 @@ -123,9 +122,14 @@ test_hardlinks() rm $SCRATCH_MNT/2 # Verify that orphan index is cleaned when dropping nlink to zero - ls $OVL_BASE_SCRATCH_MNT/$OVL_WORK/index + # With nfs_export=on index will contain a whiteout index entry, so allow + # chardev entries in index dir. + find $workdir/index -mindepth 1 -type c -o -print } +lowerdir=$OVL_BASE_SCRATCH_MNT/$OVL_LOWER +workdir=$OVL_BASE_SCRATCH_MNT/$OVL_WORK + # Remove all files from previous tests _scratch_mkfs diff --git a/tests/overlay/034 b/tests/overlay/034 index dc354c6..d9f9798 100755 --- a/tests/overlay/034 +++ b/tests/overlay/034 @@ -67,11 +67,13 @@ _require_scratch # Without overlay index feature hardlinks are broken on copy up _require_scratch_feature index +lowerdir=$OVL_BASE_SCRATCH_MNT/$OVL_LOWER +workdir=$OVL_BASE_SCRATCH_MNT/$OVL_WORK + # Remove all files from previous tests _scratch_mkfs # Create lower hardlink -lowerdir=$OVL_BASE_SCRATCH_MNT/$OVL_LOWER mkdir -p $lowerdir touch $lowerdir/0 ln $lowerdir/0 $lowerdir/1 @@ -103,7 +105,9 @@ rm $SCRATCH_MNT/4 # Verify that orphan index is cleaned on mount _scratch_cycle_mount index=on -ls $OVL_BASE_SCRATCH_MNT/$OVL_WORK/index +# With nfs_export=on index will contain a whiteout index entry, so allow +# chardev entries in index dir. +find $workdir/index -mindepth 1 -type c -o -print echo "Silence is golden" status=0 diff --git a/tests/overlay/048 b/tests/overlay/048 index 4b2c58f..3ce6270 100755 --- a/tests/overlay/048 +++ b/tests/overlay/048 @@ -111,7 +111,9 @@ test_hardlinks_offline() report_nlink "unlink last lower" # Verify that orphan index is cleaned when dropping nlink to zero - ls $workdir/index + # With nfs_export=on index will contain a whiteout index entry, so allow + # chardev entries in index dir. + find $workdir/index -mindepth 1 -type c -o -print } lowerdir=$OVL_BASE_SCRATCH_MNT/$OVL_LOWER