From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id OBEYCCJTBGVyzAAAG6o9tA:P1 (envelope-from ) for ; Fri, 15 Sep 2023 14:50:42 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id OBEYCCJTBGVyzAAAG6o9tA (envelope-from ) for ; Fri, 15 Sep 2023 14:50:42 +0200 Received: from mail.notmuchmail.org (yantan.tethera.net [135.181.149.255]) (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 D381C66555 for ; Fri, 15 Sep 2023 14:50:39 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1694782242; 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=tN8U6GYlilyqLNQHEOC1Go2SfdyOh3M7flmbANXitJg=; b=qXTwO7XrMZyiPO1o3pHcSCenBZSWkKMo06FAAlOcXN6+UpnD3XdXuj2QWB5bXZaVYNAVZt c7dnSONc54q2hcbwS+nl7Zufs0pg/gGM1rCkrvxRKHumdY5btjflsx/wmh1TBBpRQHTwiI iDLkYisuyGqX5upyuhbR5mghvptt/l6EhyTIp6QfWkSEiNsSHlp6gE1KEftZ79mCh6oPmB knN5f/3tykeJtq5cPpXbmGWvDMqMPtEQ2xA2rVmoiyjtYfYQ/xX6opK5QN++4eqjW7FDCw FTrfIteT1igJ4S7u9e1tfnLs6nqhYrnd7IhZyjCogUky//Gxd6xDMWahuc22FA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1694782242; a=rsa-sha256; cv=none; b=qQueg5Sdhi9X72o5iPvMUg72vsM6rSYWhYQCnu28B/G706uIorWG0AC/a8UERhkmMyCIDw CwbT9+TWWd1IyWLAsLeKzndDV2gmBxxAZgtxEWPEw0omrdyM9FSQvuAO7o1yahoEc+EqRk NkNb4MfbFp7GGV9Z7pLNv3F7VKyVmhDXPvdMkLMwo3k9vOcZ6P+/8EBOebZ5Cm9Qv0Haca BmD1yuBi7k9XT2gixfvOeewyp59G7zWMw92/s6spXk3DI3i7fS/N+IthQY1/HgQXlpN2xo YwLDhKoNGoIxmIeZulCr6HFBDLGsSNRJOLEPnwFIi9MlYudx5pBYM0fQqijkkg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id A865D609F2; Fri, 15 Sep 2023 12:50:25 +0000 (UTC) Received: from phubs.tethera.net (phubs.tethera.net [192.99.9.157]) by mail.notmuchmail.org (Postfix) with ESMTPS id E072A609E9 for ; Fri, 15 Sep 2023 12:50:22 +0000 (UTC) Received: from tethera.net (fctnnbsc51w-159-2-210-253.dhcp-dynamic.fibreop.nb.bellaliant.net [159.2.210.253]) by phubs.tethera.net (Postfix) with ESMTPS id 33F4C180066; Fri, 15 Sep 2023 09:50:19 -0300 (ADT) Received: (nullmailer pid 4193 invoked by uid 1000); Fri, 15 Sep 2023 12:50:18 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: [PATCH 1/4] test: add known broken test for bad utf8 in config Date: Fri, 15 Sep 2023 09:50:01 -0300 Message-Id: <20230915125004.4129-2-david@tethera.net> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230915125004.4129-1-david@tethera.net> References: <20230915125004.4129-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: Z44TJT2EVJIDLETVJIP64LPZUSZDI2NX X-Message-ID-Hash: Z44TJT2EVJIDLETVJIP64LPZUSZDI2NX 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 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 X-Migadu-Spam-Score: 0.02 X-Spam-Score: 0.02 X-Migadu-Queue-Id: D381C66555 X-Migadu-Scanner: mx0.migadu.com X-TUID: C2Svxzujn6b3 We should ideally print an informative error message, but at the very least we should not exit with success. --- test/T030-config.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/T030-config.sh b/test/T030-config.sh index ea0b4012..6ef759a4 100755 --- a/test/T030-config.sh +++ b/test/T030-config.sh @@ -3,6 +3,8 @@ test_description='"notmuch config"' . $(dirname "$0")/test-lib.sh || exit 1 +cp notmuch-config initial-config + test_begin_subtest "Get string value" test_expect_equal "$(notmuch config get user.name)" "Notmuch Test Suite" @@ -193,4 +195,11 @@ test_begin_subtest "get built_with.nonexistent prints false" output=$(notmuch config get built_with.nonexistent) test_expect_equal "$output" "false" +test_begin_subtest "Bad utf8 reported as error" +test_subtest_known_broken +cp initial-config bad-config +printf '[query]\nq3=from:\xff\n' >>bad-config +test_expect_code 1 "notmuch --config=./bad-config config list" + test_done + -- 2.40.1