From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id qJPCAR+7AWUWAAAA9RJhRA:P1 (envelope-from ) for ; Wed, 13 Sep 2023 15:37:35 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id qJPCAR+7AWUWAAAA9RJhRA (envelope-from ) for ; Wed, 13 Sep 2023 15:37:35 +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 8F60833011 for ; Wed, 13 Sep 2023 15:37:34 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=redhat.com header.s=mimecast20190719 header.b=Hkqzplpp; 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; dmarc=fail reason="SPF not aligned (relaxed)" header.from=redhat.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1694612255; a=rsa-sha256; cv=none; b=pyhafa+avu+tZadE69KYtX8AfTFTU96EWHxrOGeR4DBdnLSuNf4+stZUwtDSm6ebFPDoW8 MsOm+5gCh5Cn58+5lAR0tqqigqnLU/1iXQBi9p2BnQv8YvxKwF56wWmYpkjxhyn9vnX4xC tH15Rbo+sSNOOpMwvjcNEGGf16EjBf9Db5/ofOygw6vKCO87bhkAWNUYzngre/7nusVml/ fzu7dI2aPI6CiETHs8OZX21rlf4bLbaJ6E8J9uo2keHQllRBtWifcoTyzbBxaLjywKMYAN OEFinvubzzzBVeng5y0S9Z13kPhgjvcmvBX0sheUdwA+4aSOrmdktYcE+1offg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1694612255; 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:dkim-signature; bh=50O+U77NLi3smScppn1xeEK8Ic5gIdjBxtJCAYxoHas=; b=Bdd54/slMSy/4sSrZpiEw613zNVKbgB2sgFe37OCyXtxG6JIJPbkBv0Cx7Oy7FtpxCWhBh pk+mZir56ITT50uoy4GoqhfmRX1o0driCd4JCqSlhWC3e5zXiS1Mrrc6wTjl6ibjH4st6N vJsjD/zlriOAt37pfWUQEUk0NvdulaEsGVATmSb8/yCfbaFqVjugLKuUIxrGnqwAnnhdA9 JaLrNE6zBmsy4dVeJus5NwJt9rJoampK5Bbq/77gE1hMFtzbw6BZ0UuX2XshGzHDI3OQBY jgpNgvLt9qDRWEFx0QjMj+QCQFggh9Bsx3MEyyWEUt2kwlDnxbAzJx9hSREbTA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=redhat.com header.s=mimecast20190719 header.b=Hkqzplpp; 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; dmarc=fail reason="SPF not aligned (relaxed)" header.from=redhat.com (policy=none) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 491986097F; Wed, 13 Sep 2023 13:37:31 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mail.notmuchmail.org (Postfix) with ESMTPS id 4334460978 for ; Wed, 13 Sep 2023 13:37:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694612246; 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: in-reply-to:in-reply-to:references:references; bh=jsW7oRrGbyqNxYZTlhY0Uw5kuh6mhCwIYp8vdMREeC8=; b=HkqzplppZpUKhfSsSNTwTMJXPfM7QqDu2Tdw0PzWn9cH7SLqoBSq7f+ZsIcH+qRyJE8hzp 8ZLEfMQLn7+6CHg5+FodrAbKGwPLfbUgf5UevJCvJqPIyNZTSwNjRQhXH8t7dyjrU5ujZh O6NSOYlDPVuuJ8y30kibqNGPOMxD2JY= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-86-wgQFyXQONBWH1-WDgswgxA-1; Wed, 13 Sep 2023 09:37:24 -0400 X-MC-Unique: wgQFyXQONBWH1-WDgswgxA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D52F7181821A; Wed, 13 Sep 2023 13:37:23 +0000 (UTC) Received: from redhat.com (unknown [10.2.16.50]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6A51B40C6EA8; Wed, 13 Sep 2023 13:37:23 +0000 (UTC) Date: Wed, 13 Sep 2023 08:37:21 -0500 From: Eric Blake To: David Bremner Subject: Re: [PATCH 2/3] CLI: exit with error when load_config returns and error. Message-ID: References: <20230913005636.135665-1-david@tethera.net> <20230913005636.135665-3-david@tethera.net> MIME-Version: 1.0 In-Reply-To: <20230913005636.135665-3-david@tethera.net> User-Agent: NeoMutt/20230517 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Message-ID-Hash: A52OGSGTEQ5FT2PXSD2DGLYBL3WDAL2I X-Message-ID-Hash: A52OGSGTEQ5FT2PXSD2DGLYBL3WDAL2I X-MailFrom: eblake@redhat.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0 CC: notmuch@notmuchmail.org 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: -2.72 X-Spam-Score: -2.72 X-Migadu-Queue-Id: 8F60833011 X-Migadu-Scanner: mx2.migadu.com X-TUID: PGt19vI3TqgK On Tue, Sep 12, 2023 at 09:56:35PM -0300, David Bremner wrote: In the subject: s/and/an/ > --- > notmuch.c | 2 ++ > test/T030-config.sh | 1 - > 2 files changed, 2 insertions(+), 1 deletion(-) > > diff --git a/notmuch.c b/notmuch.c > index 37286b8f..43554530 100644 > --- a/notmuch.c > +++ b/notmuch.c > @@ -584,6 +584,8 @@ main (int argc, char *argv[]) > case NOTMUCH_STATUS_SUCCESS: > break; > default: > + fputs("error loading config file\n", stderr); > + ret = 1; > goto DONE; > } > > diff --git a/test/T030-config.sh b/test/T030-config.sh > index 6ef759a4..8b3ef436 100755 > --- a/test/T030-config.sh > +++ b/test/T030-config.sh > @@ -196,7 +196,6 @@ 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" Definite progress! It doesn't say what the precise error is, but calling out the config file as the problem is far better than silence. -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org