From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id uBmqBgQllWDbMwEAgWs5BA (envelope-from ) for ; Fri, 07 May 2021 13:31:16 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id OFxuAgQllWDbdQAA1q6Kng (envelope-from ) for ; Fri, 07 May 2021 11:31:16 +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 CA6DC19ABF for ; Fri, 7 May 2021 13:31:15 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 0C20E27DEE; Fri, 7 May 2021 07:31:03 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 1B89027167 for ; Fri, 7 May 2021 07:30:58 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id 13DE060016; Fri, 7 May 2021 07:30:58 -0400 (EDT) Received: (nullmailer pid 2687412 invoked by uid 1000); Fri, 07 May 2021 11:30:57 -0000 From: David Bremner To: notmuch@notmuchmail.org Cc: David Bremner Subject: [PATCH 1/9] test: add known broken test for relative database path in new Date: Fri, 7 May 2021 08:30:21 -0300 Message-Id: <20210507113029.2685184-2-david@tethera.net> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210507113029.2685184-1-david@tethera.net> References: <20210507113029.2685184-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: TJURMHMAGO2JEKFJAAC3WGVLMYJ2DRH7 X-Message-ID-Hash: TJURMHMAGO2JEKFJAAC3WGVLMYJ2DRH7 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=1620387075; 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=fjD2rLEGu0dfQMKBssF4u73TNWKk0zOEXBDb30w8p3o=; b=etwGHRs8aIAaodAn+vqTenGYvdQFRuUVtDW0zmsMT30Kuytg+rpQ2hetiZ1sKvg89pCEX3 Z1sGtpj6fdpuXilFxbS8vKvtTtj8iQc8lFL0FLNWtd3srl1hsjK8rsM8YBEYpeWAdRzXkr mbIdlgrA7Pmnx7KrthP3kcec7T2oFLo7E+IAav0Iu29UQKk4Jf1GtXGRprBXUnQbfbS1IM 6hU20084comMoz45j/HARYCLRUQK+NhctNa6e5j0+116CnOXk/l5KvLIXBzRK1YamjxRx+ gwlzUXjUbrPsJQjS3c1UbseLJnubqM57VuQv5BZWFuuJ4dHdyUNZShkBLCTBPA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620387075; a=rsa-sha256; cv=none; b=XAqyecqtTvUHL2V3sSLYFMpYwZlhJaA5qfx+fJBb/MeMEoadFwbAIVPEQixBQEllLwyI+d bJws2AKzr/U0s2a7AydaL1RbPKxaJo9Pj0ePoESp+xy83Ya65Rd8dM4LntbjqYNlnhb2Os hCxMh/J3QvmXeED1idZrhQL90YpW3rKX9aoFgFXx/UiWbfpnTk0wAU5CAAmjjBG3/dv4ly TXV8kT8iwaz1P7l2GmIb+o6QBM/ErnhcT41IUZEW8f86J7DwsQWIaCWY+0J5Vz2/TnBJIc DCjsPQa61TG7A0EmEIrlFS2Hr7Eo8T0svsSxp020crZfnAs7BCP5Q9dwz9MA4g== 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.63 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: CA6DC19ABF X-Spam-Score: 0.63 X-Migadu-Scanner: scn0.migadu.com X-TUID: X69KBABuArzX This test highlights a bug introduced in 0.32. The new split between path and mail_root does not properly canonicalize relative paths in the latter. --- test/T050-new.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/T050-new.sh b/test/T050-new.sh index 2985e24c..5faf6839 100755 --- a/test/T050-new.sh +++ b/test/T050-new.sh @@ -394,6 +394,19 @@ exit status: 75 EOF test_expect_equal_file EXPECTED OUTPUT +test_begin_subtest "Relative database path expanded in new" +test_subtest_known_broken +ln -s `pwd`/mail home/Maildir +notmuch config set database.path Maildir +generate_message +NOTMUCH_NEW > OUTPUT +cat <EXPECTED +Added 1 new message to the database. +EOF +notmuch config set database.path ${MAIL_DIR} +rm home/Maildir +test_expect_equal_file EXPECTED OUTPUT + add_email_corpus broken test_begin_subtest "reference loop does not crash" test_expect_code 0 "notmuch show --format=json id:mid-loop-12@example.org id:mid-loop-21@example.org > OUTPUT" -- 2.30.2