From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 2CjzBmQEBWITaAAAgWs5BA (envelope-from ) for ; Thu, 10 Feb 2022 13:26:12 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id uHZuA2QEBWIpcwAAauVa8A (envelope-from ) for ; Thu, 10 Feb 2022 13:26:12 +0100 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 952DB1D468 for ; Thu, 10 Feb 2022 13:26:11 +0100 (CET) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 9C6AD5F718; Thu, 10 Feb 2022 12:26:09 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 1E6425F714 for ; Thu, 10 Feb 2022 12:26:06 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id 3889E5FBD2; Thu, 10 Feb 2022 07:26:05 -0500 (EST) Received: (nullmailer pid 898483 invoked by uid 1000); Thu, 10 Feb 2022 12:25:41 -0000 From: David Bremner To: David Bremner , notmuch@notmuchmail.org Subject: [PATCH v2] test: known broken test for list(db.config) in python-cffi bindings Date: Thu, 10 Feb 2022 08:25:31 -0400 Message-Id: <20220210122531.898466-1-david@tethera.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220209011152.355542-1-david@tethera.net> References: <20220209011152.355542-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: EHC2RZ2IJRKULA7Z2LBBYYGHOCYO52RI X-Message-ID-Hash: EHC2RZ2IJRKULA7Z2LBBYYGHOCYO52RI 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1644495971; 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=CORh8Grah4uGZfBSQqNSzxJg0giTwN6ZsgqqbWqamIs=; b=ZaCZ+tqDxEX8fmg9vDZbImEUrusfKPOnBcDo+WSbqe2GGji6OaXCzkVLyVcEyv45A5/bXh dEHjj7WmnQ125nEA+a/6PgFfqgDJMbuXdj5VXNcUm3KR9nzffTvKLz+Dg39LSM61travn2 gjeG77gAOanfl/Tt5LLxaH3BePcNPOKzKAJzyhn0Db4QZ2/Q5gU2+oCCj8BLy5iQUMz7v6 Qb6ToMlrB2CJCHKi1/7/r3h/KyVkVbgYZvE+JKxJ4mTCfA8/gm0hZlq+x9WHCN239Q6U62 40i8JodOfSVqAPoQq19vpvZwPsreq//4KwTS+j7PbijmxFMPm+AyeCuo7EYDUg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1644495971; a=rsa-sha256; cv=none; b=Tce5MC/8ur93okyPvYBniDtJI/LWeUSv+rEdH1R/0OgBAz074B/fB3OQyUzSrOupCtmFy+ CbCxLuELeOpxpUS8ycMEW0kz00zUO+y9k0C3lpVkQxL9KlQCvXWSTnLHlFR3UMu8JYgGNV WZX36l7U0Nbl+WMWHY+H85h0/tSvHCRgs3By/J9Yz0vmcsFvfC/TZ9abchC74XgX8ABw5k +7pcT+aFuTcGS7MGTK7qWiEF47hwA8Uogh1U2bOTW/+Ho5oqdixEPU5abP8306rA/UcQMB AUlFlKPTi8N7CzwyOtOCmx+Z23yJsP81nn3/bMRJUWii88qVYGdZ/ZJ4SlPnjw== 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: -2.33 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: 952DB1D468 X-Spam-Score: -2.33 X-Migadu-Scanner: scn0.migadu.com X-TUID: 8BEHWq3QJidH As of notmuch 0.34.2, the python-cffi bindings make available the configuration from both a config file and the database Database.config. It is therefore confusing that the iterator operations only work on the configuration information stored in the database. The likely fix is to switch to the newer notmuch_config_pairs_t API. [1]: d7f95724132bf658fd151630185899737e2ed829 --- test/T055-path-config.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/test/T055-path-config.sh b/test/T055-path-config.sh index 1df240dd..105ee982 100755 --- a/test/T055-path-config.sh +++ b/test/T055-path-config.sh @@ -293,6 +293,30 @@ user.primary_email=test_suite@notmuchmail.org EOF test_expect_equal_file EXPECTED OUTPUT + test_begin_subtest "Config list from python ($config)" + test_subtest_known_broken + test_python < OUTPUT +from notmuch2 import Database +db=Database(config=Database.CONFIG.SEARCH) +for key in list(db.config): + print(key) +EOF + cat < EXPECTED +database.autocommit +database.backup_dir +database.hook_dir +database.mail_root +database.path +maildir.synchronize_flags +new.ignore +new.tags +search.exclude_tags +show.extra_headers +user.name +user.other_email +user.primary_email +EOF + test_expect_equal_file EXPECTED OUTPUT case $config in XDG*) test_begin_subtest "Set shadowed config value in database ($config)" -- 2.34.1