From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id WPT6NTURbWCFHwEAgWs5BA (envelope-from ) for ; Wed, 07 Apr 2021 03:56:05 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id iKHsLzURbWAaFAAA1q6Kng (envelope-from ) for ; Wed, 07 Apr 2021 01:56:05 +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)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5ACC0AE2B for ; Wed, 7 Apr 2021 03:56:05 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 4D94526B99; Tue, 6 Apr 2021 21:55:43 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 7D1BE20672 for ; Tue, 6 Apr 2021 21:55:38 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id 690E45FAA5; Tue, 6 Apr 2021 21:55:38 -0400 (EDT) Received: (nullmailer pid 2964208 invoked by uid 1000); Wed, 07 Apr 2021 01:55:35 -0000 From: David Bremner To: notmuch@notmuchmail.org Cc: David Bremner Subject: [PATCH 03/28] test: convert random-corpus to use n_d_open_with_config Date: Tue, 6 Apr 2021 22:55:05 -0300 Message-Id: <20210407015530.2964017-4-david@tethera.net> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210407015530.2964017-1-david@tethera.net> References: <20210407015530.2964017-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: 4E76E6PIYMSIZTZYLDEEDGUWO43OHRS7 X-Message-ID-Hash: 4E76E6PIYMSIZTZYLDEEDGUWO43OHRS7 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=1617760565; 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=JjPDM5wcVjOGFBzuM4W+ynRRIY76yKZoUKfirQt3n74=; b=P09bt0H5kWV7o6RpfW1diqArUFj9WHiAoWuQSrviKxqnkj8UoGGDeY/ELU5yEkSZZTl8cE FWItapkCVG75GNaqHiE5cyJ+dTqTftrhGrDoI1me2dKIIX8PK1V7r0Dwvd6yAXGAC5AgMk B1kxxnakac5edgy5K8TVkZgC5UyNUOAkM/j8P+1LqfG+TOt54IS5lMeq28/hf5KfNoLuW0 iIsK2yOevqyJsGgH2G4bhlN3My290en3/5nkQ6C4DQQ1r033Crg/gdmOd0a3nRp3FwXENO 8dZ2xdjg2rUQWLpc07l2UI1t+ahqSGONuUtAIyaJNV7CXjox8u5TbIPER7fWLw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617760565; a=rsa-sha256; cv=none; b=OslBGOUjsPm/7+/8HBUWup8+gSzC5EFw1m2MaRDZ4an9FK3iygQM3a1oy7zHCdnj9mJxzX wJbQEAUP/LKJoooymhypj0oOP4L5nURIPcM2d0LcKvQzJ3o+ScwNOrOEYTAac+e0eO0aFf iJeebaKWk9Zso6jpjdOSEBsB0NLfzNTXnIndSWdVYDWFfqPg4Z9Z/ux+Z8jxauu647C8T9 Yu6Nu1y/UkQoXPWVxP4ce32TaIMng7btFvWYvDKzNSuOluVIl+fzwydIFg3JwEYTHEtni0 Y0mYmGSwh6srfDluZQ3ol8ugBTGcKceYzAOogxtvh0WOK5RTY/2gF3Jz12nu2A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: 0.02 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.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: 5ACC0AE2B X-Spam-Score: 0.02 X-Migadu-Scanner: scn0.migadu.com X-TUID: dqsb0inSDyV0 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 d0354e35..7cde22c5 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.2