From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id QFhWOdkKCGEl7gAAgWs5BA (envelope-from ) for ; Mon, 02 Aug 2021 17:10:17 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id uPfoNNkKCGFYLAAAbx9fmQ (envelope-from ) for ; Mon, 02 Aug 2021 15:10:17 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (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 9BD3C2C887 for ; Mon, 2 Aug 2021 17:10:17 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 6B2412C07F; Mon, 2 Aug 2021 11:09:50 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 6465B2C049 for ; Mon, 2 Aug 2021 11:09:38 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id 5C25E5FD5C; Mon, 2 Aug 2021 11:09:38 -0400 (EDT) Received: (nullmailer pid 3234756 invoked by uid 1000); Mon, 02 Aug 2021 15:09:30 -0000 From: David Bremner To: notmuch@notmuchmail.org Cc: David Bremner Subject: [PATCH 6/8] test: add known broken tests for finding database via MAILDIR Date: Mon, 2 Aug 2021 12:09:20 -0300 Message-Id: <20210802150922.3234616-7-david@tethera.net> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210802150922.3234616-1-david@tethera.net> References: <87bl9lx864.fsf@kisara.moe> <20210802150922.3234616-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: 7WMJPGRDM57FHXPGGB6WI55G76WXTUNT X-Message-ID-Hash: 7WMJPGRDM57FHXPGGB6WI55G76WXTUNT X-MailFrom: bremner@tethera.net 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; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1627917017; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc: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-unsubscribe:list-subscribe:list-post; bh=mPhMG4r982zxqqcpYMxTFbuCTy8veE84zKgpbpSPQ7Q=; b=RQpsFpWLU17ZJs3cljaofDNjm2l2z/1jqBlWDaR4j6NqiUBytbE/ePZsfvwAEktYz7J3li jdsdOqSZqv7+C/MvPXkWOZCpbzEX4tgQ9EHEzLRRTN1crD6yuKBin7xPj2LDOG4HVERvs6 9f4g75NoHnmAnJBwWnt2VAvk0wK3/UvxufagY5YX2VBulW1bdmu2vqneAOp/hQYbeW43Dx Zf2yk9DQ13o18lIUVpMZopQEGtveuBd3XLz2DcqSoj/FP0qN+k53gqf3WEX91NVQk0r6O2 dHkzEx6lNeOMtC/UQ49lGciAN1WoxRZFy3IlyUXepqy4eOuCqS1b8TNqt6Tdfg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1627917017; a=rsa-sha256; cv=none; b=iotPsfYr9PL/UwnB94NAiWKeSznrBOME9iYQfHo4kvcvXfAcCHWYsxaIUgMm27bzj4lJ0c dKF8SnBIHPtC+8NLH73Fakp9ZoYM04b4YvNEED88asinsqgUN+N1kfXfXWFgwmSNooAWy+ FJN7QqCdScObxHqrFo5MtLI02+/j8MPyPzQcESIkwJ6+TRRz0c1kSrd4esEQ4jqGoH4nOT Ifr/+xyYPAPTcz7KJ2GhW8/Kyx6AK3ssFIlqPe4AJA4vQ8hX+EuVkT+/TBbB7bC04Fkta3 h2bQ2UYjB0M5CHCpn55VnhWwj1QWtmhTlSHktxP0zX0F5L0EMVuwpF//7jNRIg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: 0.53 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 9BD3C2C887 X-Spam-Score: 0.53 X-Migadu-Scanner: scn1.migadu.com X-TUID: tH1/ENtziEsJ This highlights a bug reported by several users, including Mohsin Kaleem [1]. The use of test_begin_subtest is because these tests pass even though the database cannot be located. [1]: id:87bl9lx864.fsf@kisara.moe --- test/T055-path-config.sh | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/test/T055-path-config.sh b/test/T055-path-config.sh index 035276c2..40601acd 100755 --- a/test/T055-path-config.sh +++ b/test/T055-path-config.sh @@ -16,6 +16,7 @@ restore_config () { unset DATABASE_PATH unset NOTMUCH_PROFILE unset XAPIAN_PATH + unset MAILDIR rm -f "$HOME/mail" cp notmuch-config-backup.${test_name} ${NOTMUCH_CONFIG} } @@ -55,6 +56,18 @@ home_mail_config () { unset DATABASE_PATH } +maildir_env_config () { + local dir + backup_config + dir="${HOME}/env_points_here" + ln -s $MAIL_DIR $dir + export MAILDIR=$dir + notmuch config set database.path + notmuch config set database.mail_root + XAPIAN_PATH="${MAIL_DIR}/.notmuch/xapian" + unset DATABASE_PATH +} + xdg_config () { local dir local profile=${1:-default} @@ -84,9 +97,12 @@ config_subtest () { local config=$2 test_begin_subtest "$title ($config)" + if [[ "$config" == "maildir_env" ]]; then + test_subtest_known_broken + fi } -for config in traditional split XDG XDG+profile symlink home_mail; do +for config in traditional split XDG XDG+profile symlink home_mail maildir_env; do #start each set of tests with an known set of messages add_email_corpus @@ -224,7 +240,7 @@ EOF "$output" \ "Welcome to a new version of notmuch! Your database will now be upgraded." - config_subtest "notmuch +config -database suggests notmuch new" "$config" + test_begin_subtest "notmuch +config -database suggests notmuch new" "$config" mv "$XAPIAN_PATH" "${XAPIAN_PATH}.bak" notmuch > OUTPUT cat < EXPECTED @@ -240,7 +256,7 @@ EOF test_expect_equal_file EXPECTED OUTPUT - config_subtest "Set config value" "$config" + test_begin_subtest "Set config value" "$config" name=${RANDOM} value=${RANDOM} notmuch config set test${test_count}.${name} ${value} @@ -259,11 +275,13 @@ EOF test_expect_equal "${output}+${output2}" "${value}+" config_subtest "Config list" "$config" - notmuch config list | notmuch_dir_sanitize | sed -e "s/^database.backup_dir=.*$/database.backup_dir/" \ - -e "s/^database.hook_dir=.*$/database.hook_dir/" \ - -e "s/^database.path=.*$/database.path/" \ - -e "s,^database.mail_root=CWD/home/mail,database.mail_root=MAIL_DIR," \ - > OUTPUT + notmuch config list | notmuch_dir_sanitize | \ + sed -e "s/^database.backup_dir=.*$/database.backup_dir/" \ + -e "s/^database.hook_dir=.*$/database.hook_dir/" \ + -e "s/^database.path=.*$/database.path/" \ + -e "s,^database.mail_root=CWD/home/mail,database.mail_root=MAIL_DIR," \ + -e "s,^database.mail_root=CWD/home/env_points_here,database.mail_root=MAIL_DIR," \ + > OUTPUT cat < EXPECTED built_with.compact=true built_with.field_processor=true -- 2.30.2