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 ms0.migadu.com with LMTPS id eGpnFfIUA2JjzAAAgWs5BA (envelope-from ) for ; Wed, 09 Feb 2022 02:12:18 +0100 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 SCHFEvIUA2JXuQAA9RJhRA (envelope-from ) for ; Wed, 09 Feb 2022 02:12:18 +0100 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 C29033446B for ; Wed, 9 Feb 2022 02:12:17 +0100 (CET) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 5BA4A5F6F1; Wed, 9 Feb 2022 01:12:15 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id 22A6E5F6C8 for ; Wed, 9 Feb 2022 01:12:12 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id EA8A25FBD2; Tue, 8 Feb 2022 20:12:10 -0500 (EST) Received: (nullmailer pid 355554 invoked by uid 1000); Wed, 09 Feb 2022 01:11:58 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: [PATCH] test: known broken test for list(db.config) in python-cffi bindings Date: Tue, 8 Feb 2022 21:11:52 -0400 Message-Id: <20220209011152.355542-1-david@tethera.net> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Message-ID-Hash: INGWJVT6BIQZYP7JF6ST6K6JDZMVTY4S X-Message-ID-Hash: INGWJVT6BIQZYP7JF6ST6K6JDZMVTY4S 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=1644369137; 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:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=G2pLl0wZY6lRYJXCiLlef7JgdYbpJoXITOiU7SSIPM4=; b=rGBgthTsh9v6dXGfDe7Zrw5wDoJjASfQh58QxzPnwU9SkAQYDCV2QKF02mwgXzzsmI2m2d WXhKz68/fEizz2GDWn9f3RHDrZHgA5qSSt//bBKUhMCJgT9Xa+iH6zkAWUxZGSVFcE0zwR U3gi+rLIbPMlIbKeqBZR42h9qFDsXnNvzwc/borlC6wyWlvJtrxUYx6UKnJTwxjWLBwtBF qeEgI/MOh+Vnip3WCPXB9qEOzocph6dGlve1Fk/OS9bnik2U3CePHhvXGKXCQSjozt/kBe hlrxUjSxZefoWnXcuA2XTw22ngsAN8CtiX2eq68Z0tKfjDuwEc1udXw5/w9y0g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1644369137; a=rsa-sha256; cv=none; b=FNsED9w2AI+uc6Xf/23TfZiuJscU9HmCrdhnlH+2mtULdK3WUS5IK/ptdy8pyonsYYftj3 8lq2FQFVxCNlasqgpfOTeRgHNLY8GyKczWyqLltEMGOpWY1D4z9BJV2ShD1nmu0/D1YzL7 FSTrfYoHrXTtoB/dWFnjJ6HbbZxhUxizq5+4MUaGa3uCHcii4d73IY8GW/bBy64LsHh/gl WTIdZCKKlYXnEH1e0ZFMeVu7LP5N+fKFmLrqoh64lvkXZrdibnX7qwtbfRDRP1SRfvitaJ 4PtdrggN+21t818Q/HaYGHdvQGzfk5Z5M0YSj8Xj0S4utZuMGth82atvf0SjsA== 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 X-Migadu-Spam-Score: -1.34 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 X-Migadu-Queue-Id: C29033446B X-Spam-Score: -1.34 X-Migadu-Scanner: scn1.migadu.com X-TUID: NByUmUOwLfG/ 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 | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/test/T055-path-config.sh b/test/T055-path-config.sh index 1df240dd..1b63bc78 100755 --- a/test/T055-path-config.sh +++ b/test/T055-path-config.sh @@ -293,6 +293,33 @@ 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 +built_with.compact +built_with.field_processor +built_with.retry_lock +built_with.sexp_queries +database.autocommit +database.backup_dir +database.hook_dir +database.mail_root +database.path +maildir.synchronize_flags +new.ignore +new.tags +search.exclude_tags= +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