From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id iJSkKto8MWDMZwAA0tVLHw (envelope-from ) for ; Sat, 20 Feb 2021 16:46:18 +0000 Received: from aspmx2.migadu.com ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id UFl7Jto8MWBaUgAA1q6Kng (envelope-from ) for ; Sat, 20 Feb 2021 16:46:18 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (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 aspmx2.migadu.com (Postfix) with ESMTPS id 3A35516AAD for ; Sat, 20 Feb 2021 17:46:18 +0100 (CET) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 5310527048; Sat, 20 Feb 2021 11:45:36 -0500 (EST) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id EC55C26B8F for ; Sat, 20 Feb 2021 11:45:05 -0500 (EST) Received: by fethera.tethera.net (Postfix, from userid 1001) id E5E1260666; Sat, 20 Feb 2021 11:45:05 -0500 (EST) Received: (nullmailer pid 3956163 invoked by uid 1000); Sat, 20 Feb 2021 16:44:54 -0000 From: David Bremner To: notmuch@notmuchmail.org Cc: David Bremner Subject: [PATCH 02/18] test: convert random-corpus to use n_d_open_with_config Date: Sat, 20 Feb 2021 12:44:32 -0400 Message-Id: <20210220164448.3956011-3-david@tethera.net> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210220164448.3956011-1-david@tethera.net> References: <20210220164448.3956011-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: RNGIZA4WIX754P3C7WOZ43THSUZUS4VK X-Message-ID-Hash: RNGIZA4WIX754P3C7WOZ43THSUZUS4VK 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 X-Migadu-Spam-Score: 0.48 Authentication-Results: aspmx2.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx2.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 3A35516AAD X-Spam-Score: 0.48 X-Migadu-Scanner: scn0.migadu.com X-TUID: IztRw6KIfZXp 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.0