From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 6YHuF2rxqGCVBgEAgWs5BA (envelope-from ) for ; Sat, 22 May 2021 13:56:26 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id AB0bE2rxqGDXPgAA1q6Kng (envelope-from ) for ; Sat, 22 May 2021 11:56:26 +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 99A29218D0 for ; Sat, 22 May 2021 13:56:25 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 5EAB42A9AF; Sat, 22 May 2021 07:56:22 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id 9FA6D2A9A4 for ; Sat, 22 May 2021 07:56:19 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id 86C895FD25; Sat, 22 May 2021 07:56:19 -0400 (EDT) Received: (nullmailer pid 1492362 invoked by uid 1000); Sat, 22 May 2021 11:56:18 -0000 From: David Bremner To: Tomi Ollila , notmuch@notmuchmail.org Subject: Re: [PATCH v4] test: replace notmuch_passwd_sanitize() with _libconfig_sanitize() In-Reply-To: <20210520134628.11653-1-tomi.ollila@iki.fi> References: <20210520134628.11653-1-tomi.ollila@iki.fi> Date: Sat, 22 May 2021 08:56:18 -0300 Message-ID: <87sg2ft21p.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: NNA2COX54XP4WMK3PL25WPWKC6MG3Z3V X-Message-ID-Hash: NNA2COX54XP4WMK3PL25WPWKC6MG3Z3V X-MailFrom: david@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=1621684585; 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-unsubscribe:list-subscribe:list-post; bh=UMGQup2W/PdEHsr5Mh3UNw09bPkNZoF+mBz2GFgbO+Q=; b=UmcC5h9U/vaBsHWJAKOX7InBT2e7c+NL4JsXi7wAbvz+uwNZXQnYkBuqeK5iJQp5fRNt0z JwHrOp8O79pRt6kPf64VvQQhgg5AaTf5WLOLf4TY+BaZJXCl1HFJsfO4l+YntnThJTMhTW CUTz34nKfrOFA9dJxQSs0+wCUGjdO61/XwBodRBdxy2qgdFl3ELBl9KhzBNF5nrXN42FhT v9dPaEQqr4bBgI5qq75IBsr0G7eNPqTssilbiy6277OyTAhNMXnbWiWj57bdjBvgIGFIlH nnl6xOhMB8oB9D/tpoUzrIkMFNMFF915FOcjCLI/rxdrLwpDLK8+Vc7+Rz2f4A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1621684585; a=rsa-sha256; cv=none; b=Y8WZaolxSeYTjGzrfnHi2yAWmSFDxkoNOIURbMsetDgGQmgtwVFvWemZVzQ8arrEoP+F9v Qr9/2WiYQncOFech/+T8HIOySbD0X+8zvTg1K7luCwiyHqttymOSO5HnM25GntXf6dtxXJ VSepqsUBRgVfy+efL8Djehgh5GHW1SoRkp3IKzKZUYvjPJiX9OPr07SOstZnIncSVQC902 mooNG5IQHUin0RiCohp4XLq9kpZFGGduJGngOQXLecwp5892PuJbwjgk+RrNck0+zJMc6x laWyj10RHLG3MDnp9XXrVVXzcuzqsha/YZm/gW+M+54rllIrNnRLLTa3/XgZ/A== 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: -2.08 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: 99A29218D0 X-Spam-Score: -2.08 X-Migadu-Scanner: scn0.migadu.com X-TUID: UH4DtpJk3zwz Tomi Ollila writes: > cat < c_head > #include > #include > @@ -380,26 +399,26 @@ cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} '' %NULL% > key < NOTMUCH_CONFIG_LAST; > key = (notmuch_config_key_t)(key + 1)) { > const char *val = notmuch_config_get (db, key); > - printf("%s\n", val ? val : "NULL" ); > + printf("%x: '%s'\n", key, val ? val : "NULL" ); > } > } > EOF It seems not that unlikely that we will hit 16 configuration keys. Would it be better to use 2 digits 0 padded (and in that case we could probably stick to decimal). Or maybe having different number of digits for later keys does not matter? d