From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id gI26BfTaQGALUwAA0tVLHw (envelope-from ) for ; Thu, 04 Mar 2021 13:04:52 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id KOhrAfTaQGCWbAAAbx9fmQ (envelope-from ) for ; Thu, 04 Mar 2021 13:04:52 +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 A239C16095 for ; Thu, 4 Mar 2021 14:04:51 +0100 (CET) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 06FFD27D3E; Thu, 4 Mar 2021 08:02:45 -0500 (EST) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 3BE862757E for ; Thu, 4 Mar 2021 08:02:12 -0500 (EST) Received: by fethera.tethera.net (Postfix, from userid 1001) id 32BEE5FA96; Thu, 4 Mar 2021 08:02:12 -0500 (EST) Received: (nullmailer pid 4047164 invoked by uid 1000); Thu, 04 Mar 2021 13:01:45 -0000 From: David Bremner To: notmuch@notmuchmail.org Cc: David Bremner Subject: [PATCH 02/27] test: convert random-corpus to use n_d_open_with_config Date: Thu, 4 Mar 2021 09:01:14 -0400 Message-Id: <20210304130139.4046183-3-david@tethera.net> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210304130139.4046183-1-david@tethera.net> References: <20210304130139.4046183-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: F4N2PTKIGIZU5Q4TC2TWBRNZZEWSPBIC X-Message-ID-Hash: F4N2PTKIGIZU5Q4TC2TWBRNZZEWSPBIC 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; 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=1614863091; 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-unsubscribe:list-subscribe:list-post; bh=jzrtFv0X92314fTLfRfQVWdFyqzaf+R57juntW+EVBU=; b=ubxZedruOBXpGrnTL9bIQIdHRwEOYIHGIdXO8Tq61hbdB8Z6dYNJXFEeH/8SwMujcAFfDS miGBah+vTfThLgZiym6gXUybjHDTRUOl2rVdZy0z2pae3pClANzbc/58uOyQ0A0POsJVt0 RT22IHregqAYudsb5lxVfdbF0/9kvCuoZq8B0ps09vKQYDoMEA0p/lHH7cvaXDZPNTcD++ AGX+O41cloPW+Im0qbRGBIOizm1/z33LsRnEgMYeTkfRvoKLkQPmWtX5wjxfZQKUvjxqiV 1PZElkb1/VhAyBPdMLAfFEi9+wKbm3IbE3AUDVTN2kstX+T/SY0yNjBiukkAtg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1614863091; a=rsa-sha256; cv=none; b=SFfQIre+8DHRoIX6sru5FCBdv219cKteCzqJ0GPC4WZJGE1KExoCI9i57tTUoaIkNLJud2 ifcuFftKCRyxDpIjVQtHHhgxqoHU7fbfu2OnW6d02uAnQfnkMx894i4/VH2G55zV/dXZrU DZGYUw7RSRSq6rX0+wAGpBXYGOP16ukiJvhevxckXcn2lxBj0D6fVmMKGupfukroeEhCBu p+SWcZUmqzH7Pjb1/Y8WCIo9PsUAiTzbBZwaYg1uhhtIEqiLWOYAMRSqFfGpkPd7tbQhes aF2BOt79J1bFStor78Et/YO4NZCystTi9MBW2VLR7gHRUrywelWufpnuVDzA/Q== 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: -0.96 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: A239C16095 X-Spam-Score: -0.96 X-Migadu-Scanner: scn1.migadu.com X-TUID: kzfLYne1Zyex Remove one more usage of notmuch_config_get_database_path --- test/random-corpus.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/test/random-corpus.c b/test/random-corpus.c index ff413252..67e106e0 100644 --- a/test/random-corpus.c +++ b/test/random-corpus.c @@ -141,7 +141,6 @@ main (int argc, char **argv) void *ctx = talloc_new (NULL); const char *config_path = NULL; - notmuch_config_t *config; notmuch_database_t *notmuch; int num_messages = 500; @@ -179,12 +178,12 @@ main (int argc, char **argv) exit (1); } - config = notmuch_config_open (ctx, config_path, false); - if (config == NULL) - return 1; - - if (notmuch_database_open (notmuch_config_get_database_path (config), - NOTMUCH_DATABASE_MODE_READ_WRITE, ¬much)) + if (notmuch_database_open_with_config (NULL, + NOTMUCH_DATABASE_MODE_READ_WRITE, + config_path, + NULL, + ¬much, + NULL)) return 1; srandom (seed); -- 2.30.1