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 ms5.migadu.com with LMTPS id MK4DMpvQ42Ik4gAAbAwnHQ (envelope-from ) for ; Fri, 29 Jul 2022 14:20:43 +0200 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 gCMRMpvQ42JfJwAA9RJhRA (envelope-from ) for ; Fri, 29 Jul 2022 14:20:43 +0200 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 A4BF02F17A for ; Fri, 29 Jul 2022 14:20:43 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 50F495F388; Fri, 29 Jul 2022 12:20:21 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 7C52C5F371 for ; Fri, 29 Jul 2022 12:20:17 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id B13625FBD7; Fri, 29 Jul 2022 08:20:16 -0400 (EDT) Received: (nullmailer pid 1557186 invoked by uid 1000); Fri, 29 Jul 2022 12:20:10 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: [PATCH 3/6] test/path-config: set database.mail_root but not database.path Date: Fri, 29 Jul 2022 09:19:58 -0300 Message-Id: <20220729122001.1556787-4-david@tethera.net> X-Mailer: git-send-email 2.35.2 In-Reply-To: <20220729122001.1556787-1-david@tethera.net> References: <20220729122001.1556787-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: DHVZFZKPU7TGT5GWDCTMVVTCGRFF3V5T X-Message-ID-Hash: DHVZFZKPU7TGT5GWDCTMVVTCGRFF3V5T 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; digests; suspicious-header CC: spwhitton@spwhitton.name 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-To: larch@yhetil.org X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1659097243; 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-owner:list-unsubscribe:list-subscribe:list-post; bh=suUS+2baealiYjDBRaB10iNYH7IB5EdE4/lIG/Zy3qc=; b=Y+FDp0YhxoqhQza+wRG2r68kJ5A6He0dZVmmEyVIiZAYz4UJq/YZFvs8sILYFBjJvbxbyp YRvvG+4qgTTgS8q3TCNyswOHXJNg4W63MjMw+/k3fuv44IKJVxqD8CCvNB3qMGmQ6ni2rJ gGOIC1jeYGcltC9wbLe27Am9zZIzwdurONs1ppGFnCtNpPWvrbfHo7PUv0z7lvr8E/DSGt QJJ9+naj/1I4TqHBuqqm4oVEZ+kl/XvollP1AG0rhsjd64+RiEGXXAKAf2NDsRHoLl9KW0 0yhKChJ4A4eeGEwA4T6F3gGqX6mp8NCzSi4hEND3cMCL/hiOiLv03adUtjN8DA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1659097243; a=rsa-sha256; cv=none; b=bMdtjQ1qqAQGpNSNd3XCR5MCmD8NwSQT17tcH3UzVLW46z5UrcmpGkgrnB1T6o72fxq+Dy 6fYuy6+74H9WLWrLqMHif8sZhPEEf0ttwJXQrFC8v28ry1UWlG4b8+iSQmg7f3OyRCIgUk HtER5RkA9/BHH1OT9LJOSJV/vWq6wpT+WUh8jQfwYnBAf1who6blDRF9oey8SgvC39p2rP uhQoV85t8otsL5VqyV5NnbaihgHFS9KKE8xUMFayIfkD7QXqnxWLKKcJMEq8oWLzBoj6sA l/yXQUWIjLYOLLAauQkkBW3R5tSiZ0Nq6X87hxpDbBUcnp7OdyVJs5xUQW0/VQ== 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.60 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: A4BF02F17A X-Spam-Score: -1.60 X-Migadu-Scanner: scn0.migadu.com X-TUID: SMEOKnO+ky6H The failing "create database" test replicates a bug reported by Sean Whitton [1]. The other two failures also look related to the database being (re)created in the wrong place. [1]: id:87y1wqkw13.fsf@athena.silentflame.com. --- test/T055-path-config.sh | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/test/T055-path-config.sh b/test/T055-path-config.sh index 45545d88..149aa6a1 100755 --- a/test/T055-path-config.sh +++ b/test/T055-path-config.sh @@ -92,7 +92,20 @@ xdg_config () { notmuch --config=${CONFIG_PATH} config set database.path } -for config in traditional split XDG XDG+profile symlink home_mail maildir_env; do +mailroot_only_config () { + local dir + + backup_config + notmuch config set database.mail_root ${TMP_DIRECTORY}/mail + notmuch config set database.path + DATABASE_PATH="${HOME}/.local/share/notmuch/default" + rm -rf $DATABASE_PATH + mkdir -p $DATABASE_PATH + XAPIAN_PATH="${DATABASE_PATH}/xapian" + mv mail/.notmuch/xapian $DATABASE_PATH +} + +for config in traditional split XDG XDG+profile symlink home_mail maildir_env mailroot_only; do #start each set of tests with an known set of messages add_email_corpus @@ -122,6 +135,9 @@ for config in traditional split XDG XDG+profile symlink home_mail maildir_env; d maildir_env) maildir_env_config ;; + mailroot_only) + mailroot_only_config + ;; esac test_begin_subtest "count ($config)" @@ -314,11 +330,6 @@ user.primary_email EOF test_expect_equal_file EXPECTED OUTPUT - test_begin_subtest "create database ($config)" - rm -r ${XAPIAN_PATH} - notmuch new - test_expect_equal "$(xapian-metadata get ${XAPIAN_PATH} version)" 3 - case $config in XDG*) test_begin_subtest "Set shadowed config value in database ($config)" @@ -355,6 +366,13 @@ Added 1 new message to the database. thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Do not ignore, very important (inbox unread) EOF test_expect_equal_file EXPECTED OUTPUT + ;& + mailroot_only) + test_begin_subtest "create database parent dir ($config)" + test_subtest_known_broken + rm -r ${DATABASE_PATH} + notmuch new + test_expect_equal "$(xapian-metadata get ${XAPIAN_PATH} version)" 3 ;; *) backup_database -- 2.35.2