From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id yBhbN2rJDGJxwgAAgWs5BA (envelope-from ) for ; Wed, 16 Feb 2022 10:52:42 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id mBzBNGrJDGL2DQEA9RJhRA (envelope-from ) for ; Wed, 16 Feb 2022 10:52:42 +0100 Received: from mail.notmuchmail.org (yantan.tethera.net [IPv6:2a01:4f9:c011:7a79::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 615282B4AF for ; Wed, 16 Feb 2022 10:52:42 +0100 (CET) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 161355F70A; Wed, 16 Feb 2022 09:52:40 +0000 (UTC) Received: from mailproxy07.manitu.net (mailproxy07.manitu.net [IPv6:2a00:1828:1000:1112::2]) by mail.notmuchmail.org (Postfix) with ESMTPS id D25315F5E3 for ; Wed, 16 Feb 2022 09:52:36 +0000 (UTC) Received: from localhost (200116b860d8d700f2fa0f1405214039.dip.versatel-1u1.de [IPv6:2001:16b8:60d8:d700:f2fa:f14:521:4039]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: michael@grubix.eu) by mailproxy07.manitu.net (Postfix) with ESMTPSA id D0676C8802; Wed, 16 Feb 2022 10:52:37 +0100 (CET) From: Michael J Gruber To: notmuch@notmuchmail.org Subject: [PATCH] test: allow to use --full-sync Date: Wed, 16 Feb 2022 10:52:35 +0100 Message-Id: <8ab69ee29faf9322c5ba25ac0fe320ca17f67490.1645005076.git.git@grubix.eu> X-Mailer: git-send-email 2.35.1.476.gacce7e407c In-Reply-To: <164493828675.3239.10351078681225652378.git@grubix.eu> References: <164493828675.3239.10351078681225652378.git@grubix.eu> MIME-Version: 1.0 Message-ID-Hash: R3GGT3CBNSXJK6AHZD7LYFIFAERZ3HHN X-Message-ID-Hash: R3GGT3CBNSXJK6AHZD7LYFIFAERZ3HHN X-MailFrom: git@grubix.eu X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1645005162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=YuGNHH6qHcPBlol7u28vTN1PiV1Ogr4Ra3E54lk4Nv0=; b=eK+V1+tRHwcDaZw+N6+/w5CuHTU7iL3pxb7DrjMi1Z5iW/wal61VQ006ppviMqEmlr9OQv T3BWcGAeBLjcgnqt7zRX5Imfh+3x57cGXZhoIPXXzopD6W6eLS1x//gFJVf8SheAFPHt6k 6vZkGFhGinrTdFc9QDTAF7jIZYUNR7aEp6rMWxJPvJI3jsgqO42rPFEgRtKNJ/+YhgcZCF /yP7vRcOBpKN0jMIcaQXhvRavHoBo3v7+iRH30PuwqR8RMCVnByZpsW/H41yu4rpB22HqI X+8ruVkD3os0AV98s78RZcoLcNlzMJ6ZLn+6w0uVI8oCHR2eM0xLw/IXJSdqkg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1645005162; a=rsa-sha256; cv=none; b=qJQXmwt7RbPDOMcDDYYJJH+PgZOYSB6dEcuYBMe9kswCdzzfUkYYbFrogU6wbP1psLUCvM pGcxv8tGWqWBWzXIDjdjH22zSvZbvaeg92l6JTVhf0ZULzlN25AEAbE9mYD5MrzdROQNbp zIPcWU2xBY1sND9G1PdHUtkOoA9Oa70ELZoVf8xKZA/KyC1vqqoehx1gaMQXSntW+VCroy g25Kb/BuKqf6kdLLfoByr82GO/6WaGhbMDrM+xukEdj5AgO1GKdAHFJ6RTaXAeEvji34Zs gk5C8Ajr1YpVU6TF1HxpPPjAeSL00V+RzXOntPkV5+85GGWBmCVmRruOPhFscQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -1.54 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 615282B4AF X-Spam-Score: -1.54 X-Migadu-Scanner: scn1.migadu.com X-TUID: Cwkb4K16c6qB Some build infrastructure appears to habe problems with mtime/stat, leading to spurious failures (noticed on s390x and aarch64 with epel8). Allow the test suite to be run with --full-sync so that release builds can use the test suite while avoiding spurious failures. Signed-off-by: Michael J Gruber --- test/README | 8 ++++++++ test/test-lib-common.sh | 7 ++++++- test/test-lib.sh | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/test/README b/test/README index 10f127cb..1de79b78 100644 --- a/test/README +++ b/test/README @@ -110,6 +110,14 @@ printed on screen. This printing can be disabled by setting the NOTMUCH_TEST_QUIET variable to a non-null value. Message on test failures and skips are still printed. +File system/mtime issues +------------------------ +Normally, `notmuch new` uses directory modification times, and the test +suite checks that this works. If you encounter spurious test failures +where messages added by one subtest appear to show up in the next subtest +only (indicating mtime/stat problems) you can set NOTMUCH_TEST_FULLSYNC +so that the test suite uses the --full-sync option of notmuch new. + Skipping Tests -------------- If, for any reason, you need to skip one or more tests, you can do so diff --git a/test/test-lib-common.sh b/test/test-lib-common.sh index ebbf4cdf..91039478 100644 --- a/test/test-lib-common.sh +++ b/test/test-lib-common.sh @@ -29,6 +29,11 @@ if [[ -z "$NOTMUCH_SRCDIR" ]] || [[ -z "$NOTMUCH_BUILDDIR" ]]; then exit 1 fi +if test -n "$NOTMUCH_TEST_FULLSCAN" +then + NOTMUCH_NEW_OPTIONS="--full-scan" +fi + backup_database () { test_name=$(basename $0 .sh) rm -rf $TMP_DIRECTORY/notmuch-dir-backup."$test_name" @@ -226,7 +231,7 @@ EOF # are also supported here, so see that function for details. add_message () { generate_message "$@" && - notmuch new > /dev/null + notmuch new $NOTMUCH_NEW_OPTIONS > /dev/null } if test -n "$valgrind" diff --git a/test/test-lib.sh b/test/test-lib.sh index 833bf5fe..0167b95f 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -521,7 +521,7 @@ test_json_nodes () { } NOTMUCH_NEW () { - notmuch new "${@}" | grep -v -E -e '^Processed [0-9]*( total)? file|Found [0-9]* total file' + notmuch new $NOTMUCH_NEW_OPTIONS "${@}" | grep -v -E -e '^Processed [0-9]*( total)? file|Found [0-9]* total file' } NOTMUCH_DUMP_TAGS () { -- 2.35.1.476.gacce7e407c