From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 022EB6DE01E3 for ; Sun, 29 Apr 2018 09:24:09 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.029 X-Spam-Level: X-Spam-Status: No, score=0.029 tagged_above=-999 required=5 tests=[AWL=0.049, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ucAxVt8w2DS3 for ; Sun, 29 Apr 2018 09:24:08 -0700 (PDT) Received: from mail-lf0-f68.google.com (mail-lf0-f68.google.com [209.85.215.68]) by arlo.cworth.org (Postfix) with ESMTPS id EF7DE6DE01DB for ; Sun, 29 Apr 2018 09:24:07 -0700 (PDT) Received: by mail-lf0-f68.google.com with SMTP id m18-v6so9161878lfb.0 for ; Sun, 29 Apr 2018 09:24:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nikula-org.20150623.gappssmtp.com; s=20150623; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=sG/pA86xDN5O+L54J3y1BwmNnSCHFEa1QI8SZsxBut0=; b=ZUAVqFGSFTnwnZckP+WSVYDOky7QWxhGXWtOiIuG5SGz9yAzPSG1/4BEjFZix0O57o ZQRXXFm+IjBRgm/9LgqwITOpgy0/YqDHdcSEc048qW49hqWzDw+n5hocQOs6wMKgCqaK i0MoZEMw1VST/dLaVxbOUO/8M/VrgbS6q68arCGY5ey0yy7K5fz6mgbPYXK36gYlIKVW P2EYIoX0aNXw9naF6qLb1WLwYGxNNSumMdvDXG69Q5MkU0RckaJNwjxULCk1b7kBfhv/ qobc9iJo1pR1DFUyq9uWJf8N6Gln9WsZuAMYXdsNzFsCRom5gj6VDJS9C0TqoNKAjvW0 Crtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=sG/pA86xDN5O+L54J3y1BwmNnSCHFEa1QI8SZsxBut0=; b=tbUo8EMfRQ7qfbPT8EQg4K+FX93hyNOREKFvLbyQZElzwHjNCnb+rHdAyGaH8Ukjbr Ydlq7DLCkFph6VZrdpYHSsob3bo4qk3x4Fy5/kjrDwZaPrQoywyjD3SKKw5DbeHSkDao uRACSZeAKXA7/vEIKzgMEn687dORpCx5afZH/LrVuExwu7cX/QS5OPtJ6y8MrazRn8Gp /Y1QWDxBGR8pyzppQ6R6/i+/XdD82Kog7BIwNDhQ89wfBW0q1KEsmib4II4cdH28EnNP lEv/ZBoTAzzgnh9cYTjZQY/5JisPJMmBU/MHloV+5KkA82IoYcUA/p1oqdRP1hJ1seNG rX9g== X-Gm-Message-State: ALQs6tCOfCwPuQSfK62akbBmLDk8xhyjcB9h0PAtYWfSWXTpLIL00tv7 96Nwde5I6YvlSbYHmRb1qRHSE14yhrA= X-Google-Smtp-Source: AB8JxZrbsVRR5iBm/VbqoTkxVJ40UBtHAu38cbOw0PVa1iU1knojKzrTrWXXOJ3ITP9KRw2ISpHnbg== X-Received: by 2002:a19:5519:: with SMTP id n25-v6mr2842660lfe.110.1525019046367; Sun, 29 Apr 2018 09:24:06 -0700 (PDT) Received: from localhost (213-216-249-136.bb.dnainternet.fi. [213.216.249.136]) by smtp.gmail.com with ESMTPSA id m6-v6sm1204194lfb.61.2018.04.29.09.24.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 29 Apr 2018 09:24:05 -0700 (PDT) From: Jani Nikula To: David Bremner , David Bremner , notmuch@notmuchmail.org Subject: Re: [PATCH 2/2] test: use --no-mtime-opt in T050-new.sh In-Reply-To: <20180429114858.20354-2-david@tethera.net> References: <877eoq8jwd.fsf@nikula.org> <20180429114858.20354-1-david@tethera.net> <20180429114858.20354-2-david@tethera.net> Date: Sun, 29 Apr 2018 19:24:03 +0300 Message-ID: <871sey7zh8.fsf@nikula.org> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Apr 2018 16:24:09 -0000 On Sun, 29 Apr 2018, David Bremner wrote: > Wherever the test relies on directories being scanned, this option > should be used to avoid skipping them due to mtimes on directories > matching the database. I think you could additionally remove a few touch calls in the test. Some of them do actually create empty files, but some of them just touch directories to force rescans. Otherwise, LGTM. BR, Jani. > --- > test/T050-new.sh | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/test/T050-new.sh b/test/T050-new.sh > index 9025fa7a..12dba471 100755 > --- a/test/T050-new.sh > +++ b/test/T050-new.sh > @@ -87,7 +87,7 @@ notmuch new > /dev/null > > mv "${MAIL_DIR}"/dir "${MAIL_DIR}"/dir-renamed > > -output=$(NOTMUCH_NEW --debug) > +output=$(NOTMUCH_NEW --debug --no-mtime-opt) > test_expect_equal "$output" "(D) add_files, pass 2: queuing passed directory ${MAIL_DIR}/dir for deletion from database > No new mail. Detected 3 file renames." > > @@ -95,7 +95,7 @@ No new mail. Detected 3 file renames." > test_begin_subtest "Deleted directory" > rm -rf "${MAIL_DIR}"/dir-renamed > > -output=$(NOTMUCH_NEW --debug) > +output=$(NOTMUCH_NEW --debug --no-mtime-opt) > test_expect_equal "$output" "(D) add_files, pass 2: queuing passed directory ${MAIL_DIR}/dir-renamed for deletion from database > No new mail. Removed 3 messages." > > @@ -114,7 +114,7 @@ test_begin_subtest "Deleted directory (end of list)" > > rm -rf "${MAIL_DIR}"/zzz > > -output=$(NOTMUCH_NEW --debug) > +output=$(NOTMUCH_NEW --debug --no-mtime-opt) > test_expect_equal "$output" "(D) add_files, pass 3: queuing leftover directory ${MAIL_DIR}/zzz for deletion from database > No new mail. Removed 3 messages." > > @@ -165,7 +165,7 @@ test_begin_subtest "Deleted two-level directory" > > rm -rf "${MAIL_DIR}"/two > > -output=$(NOTMUCH_NEW --debug) > +output=$(NOTMUCH_NEW --debug --no-mtime-opt) > test_expect_equal "$output" "(D) add_files, pass 3: queuing leftover directory ${MAIL_DIR}/two for deletion from database > No new mail. Removed 3 messages." > > @@ -211,7 +211,7 @@ Subject: Test mbox message 2 > > Body 2. > EOF > -output=$(NOTMUCH_NEW --debug 2>&1) > +output=$(NOTMUCH_NEW --debug --no-mtime-opt 2>&1) > test_expect_equal "$output" \ > "Note: Ignoring non-mail file: ${MAIL_DIR}/.git/config > Note: Ignoring non-mail file: ${MAIL_DIR}/.ignored_hidden_file > @@ -234,7 +234,7 @@ touch "${MAIL_DIR}"/.git # change .git's mtime for notmuch new to rescan. > touch "${MAIL_DIR}" # likewise for MAIL_DIR > mkdir -p "${MAIL_DIR}"/one/two/three/.git > touch "${MAIL_DIR}"/{one,one/two,one/two/three}/ignored_file > -output=$(NOTMUCH_NEW --debug 2>&1 | sort) > +output=$(NOTMUCH_NEW --debug --no-mtime-opt 2>&1 | sort) > test_expect_equal "$output" \ > "(D) add_files, pass 1: explicitly ignoring ${MAIL_DIR}/.git > (D) add_files, pass 1: explicitly ignoring ${MAIL_DIR}/.ignored_hidden_file > @@ -261,7 +261,7 @@ test_expect_equal "$output" "No new mail." > > test_begin_subtest "Ignore files and directories specified in new.ignore (regexp)" > notmuch config set new.ignore ".git" "/^bro.*ink\$/" "/ignored.*file/" > -output=$(NOTMUCH_NEW --debug 2>&1 | sort) > +output=$(NOTMUCH_NEW --debug --no-mtime-opt 2>&1 | sort) > test_expect_equal "$output" \ > "(D) add_files, pass 1: explicitly ignoring ${MAIL_DIR}/.git > (D) add_files, pass 1: explicitly ignoring ${MAIL_DIR}/.ignored_hidden_file > -- > 2.17.0