From patchwork Sun Jan 31 21:24:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konstantin Khlebnikov X-Patchwork-Id: 8174951 Return-Path: X-Original-To: patchwork-fstests@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C79F8BEEE5 for ; Sun, 31 Jan 2016 21:25:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 752DB2012E for ; Sun, 31 Jan 2016 21:25:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 73BAF2011B for ; Sun, 31 Jan 2016 21:25:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757461AbcAaVZF (ORCPT ); Sun, 31 Jan 2016 16:25:05 -0500 Received: from mail-lf0-f47.google.com ([209.85.215.47]:33242 "EHLO mail-lf0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757294AbcAaVZD (ORCPT ); Sun, 31 Jan 2016 16:25:03 -0500 Received: by mail-lf0-f47.google.com with SMTP id m1so9609792lfg.0; Sun, 31 Jan 2016 13:25:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:from:to:cc:date:message-id:user-agent:mime-version :content-type:content-transfer-encoding; bh=sxq0+sk4txbcI7F0mJEg1R40PmbicUTY9m0g5MQibXA=; b=gAm0LEoI5U1VoKnjHD5t914pwOE9O3lkwci69PRmDn/1vneB5kzSAeWUoS/JxAoVZ5 7stsW+3AzgS/A8r4dH5fzADStVMR6PljgZGrUfkHMNqKEGwjT3grwS/u/DM8SRlY3qMm KOR0ajeQGga9YuJuduI+lRrxx3ZexNyAuYD8YgjIMaReneo2GZ7ljeV46IWlQLpqsQ+Y A0hxO13wcJkAE13Ug1s+1qtzIwtb/dgjv300sPwMkIldBOjVh3cEYsuU2COP/GLd/UaF 8HrffWxhP4DDOn+KVmx0p5xQXaHLaLA27ggLcFc6kl7ESki2/rve7xW94vLbJDbkGhzI otHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:from:to:cc:date:message-id:user-agent :mime-version:content-type:content-transfer-encoding; bh=sxq0+sk4txbcI7F0mJEg1R40PmbicUTY9m0g5MQibXA=; b=UgFEsJVRip03WtOxoHuxHWFCkbFB0KvSVuOasYGHX9xPHpZCWxfiOGHEEG33lJUWHa 08XMAizXE3JhuUXhJodqvVYHN0UvFurI0g9dRLsgBWs2CNjNn5azj4eI+GC752IAqlaX nsvKys2//CqAUCg2WxPnFlNcf3hDbzsKGW3+gC3pMwM5HLhwz1lMZIfHmYYC2hGawnMq UB5f2MY1Pcgavu4sqApYhJTklbDZLF/X2hHB5W/Tmydc1lH0BsXcbontwgcLpP3GoWZ4 HXx2pY2tkFVvC2aK+tWCfKQHjxKWVYhsHBZMpCvCEbugYEzsCr3BXnXU9LNzgbA795I7 n9Nw== X-Gm-Message-State: AG10YORlEJf1idEwRvSHLWiqpkuP+d+jjjrL4ri+eQ2XBOq/0jSc3fN9aYU1s/RoahTHUQ== X-Received: by 10.25.145.14 with SMTP id t14mr7788054lfd.100.1454275501883; Sun, 31 Jan 2016 13:25:01 -0800 (PST) Received: from localhost (ppp79-139-147-94.pppoe.spdop.ru. [79.139.147.94]) by smtp.gmail.com with ESMTPSA id ug1sm3594666lbb.43.2016.01.31.13.25.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 31 Jan 2016 13:25:00 -0800 (PST) Subject: [PATCH] overlay: check visible whiteouts in pure-upper directory From: Konstantin Khlebnikov To: fstests@vger.kernel.org Cc: Miklos Szeredi , Eryu Guan , linux-unionfs@vger.kernel.org Date: Mon, 01 Feb 2016 00:24:57 +0300 Message-ID: <145427549775.28346.2363708034750122757.stgit@zurg> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 Moving non-pure file into pure-upper directory and removing it here leaves visible whiteout. Signed-off-by: Konstantin Khlebnikov --- tests/overlay/002 | 71 +++++++++++++++++++++++++++++++++++++++++++++++++ tests/overlay/002.out | 2 + tests/overlay/group | 1 + 3 files changed, 74 insertions(+) create mode 100755 tests/overlay/002 create mode 100644 tests/overlay/002.out -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/tests/overlay/002 b/tests/overlay/002 new file mode 100755 index 000000000000..30b2b5561fce --- /dev/null +++ b/tests/overlay/002 @@ -0,0 +1,71 @@ +#! /bin/bash +# FS QA Test 002 +# +# Visible whiteouts in pure-upper directory +# +# https://bugzilla.kernel.org/show_bug.cgi?id=109611 +# https://github.com/docker/docker/issues/9572 +# +#----------------------------------------------------------------------- +# Copyright (c) 2016 Konstantin Khlebnikov. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it would be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +#----------------------------------------------------------------------- +# + +seq=`basename $0` +seqres=$RESULT_DIR/$seq +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +status=1 # failure is the default! +trap "_cleanup; exit \$status" 0 1 2 3 15 + +_cleanup() +{ + cd / + rm -f $tmp.* + rm -fr $TEST_DEV/upper/$seq.pure + rm -fr $TEST_DEV/upper/$seq.file + rm -fr $TEST_DEV/lower/$seq.file +} + +# get standard environment, filters and checks +. ./common/rc +. ./common/filter + +# remove previous $seqres.full before test +rm -f $seqres.full + +# real QA test starts here + +# Modify as appropriate. +_supported_fs overlay +_supported_os Linux +_require_test + +echo "Silence is golden." + +touch $TEST_DEV/lower/$seq.file + +cd $TEST_DIR +mkdir $seq.pure +mv $seq.file $seq.pure +rm $seq.pure/$seq.file +ls $seq.pure + +# success, all done +status=0 +exit diff --git a/tests/overlay/002.out b/tests/overlay/002.out new file mode 100644 index 000000000000..c1642bfddbae --- /dev/null +++ b/tests/overlay/002.out @@ -0,0 +1,2 @@ +QA output created by 002 +Silence is golden. diff --git a/tests/overlay/group b/tests/overlay/group index 51a62cf64b89..877b5d2d6add 100644 --- a/tests/overlay/group +++ b/tests/overlay/group @@ -4,3 +4,4 @@ # do not start group name with a digit # 001 perms auto quick +002 auto quick metadata