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 OI2eCphXk14HZwAA0tVLHw (envelope-from ) for ; Sun, 12 Apr 2020 18:02:00 +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 2GPBJZpXk17rdwAAbx9fmQ (envelope-from ) for ; Sun, 12 Apr 2020 18:02:02 +0000 Received: from arlo.cworth.org (arlo.cworth.org [50.126.95.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5E146941F8D for ; Sun, 12 Apr 2020 18:01:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id ABE746DE13BE; Sun, 12 Apr 2020 11:01:54 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HV3JLS90o-ru; Sun, 12 Apr 2020 11:01:54 -0700 (PDT) Received: from arlo.cworth.org (localhost [IPv6:::1]) by arlo.cworth.org (Postfix) with ESMTP id A40036DE10D9; Sun, 12 Apr 2020 11:01:53 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 08FCF6DE10D9 for ; Sun, 12 Apr 2020 11:01:53 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4HHrdxYfXyCS for ; Sun, 12 Apr 2020 11:01:52 -0700 (PDT) X-Greylist: delayed 1627 seconds by postgrey-1.36 at arlo; Sun, 12 Apr 2020 11:01:51 PDT Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id F30A56DE104A for ; Sun, 12 Apr 2020 11:01:51 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.92) (envelope-from ) id 1jNgVF-00010o-SB; Sun, 12 Apr 2020 13:34:41 -0400 Received: (nullmailer pid 2575496 invoked by uid 1000); Sun, 12 Apr 2020 17:34:40 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: [PATCH] test: add known_broken test for dumping large stored queries Date: Sun, 12 Apr 2020 14:34:32 -0300 Message-Id: <20200412173432.2575450-1-david@tethera.net> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: notmuch-bounces@notmuchmail.org Sender: "notmuch" X-Scanner: scn0 X-Spam-Score: 1.49 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 50.126.95.6 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Scan-Result: default: False [1.49 / 13.00]; RCVD_TLS_LAST(0.00)[]; GENERIC_REPUTATION(0.00)[-0.44906860871286]; MX_INVALID(1.00)[]; FROM_HAS_DN(0.00)[]; IP_REPUTATION_HAM(0.00)[asn: 27017(-0.18), country: US(-0.01), ip: 50.126.95.6(-0.45)]; R_SPF_ALLOW(-0.20)[+a]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[notmuch@notmuchmail.org]; TO_DN_NONE(0.00)[]; HAS_LIST_UNSUB(-0.01)[]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; FORGED_SENDER_MAILLIST(0.00)[]; MID_CONTAINS_FROM(1.00)[]; MAILLIST(-0.20)[mailman]; DMARC_NA(0.00)[tethera.net]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:27017, ipnet:50.126.64.0/18, country:US]; FROM_NEQ_ENVFROM(0.00)[david@tethera.net,notmuch-bounces@notmuchmail.org]; RCVD_COUNT_SEVEN(0.00)[8] X-TUID: 3IKjJRKGzY8x 'qsx' reported a bug on #notmuch with notmuch-dump and large stored queries. This test will pass (on my machine) if the value of `repeat' is made smaller. --- test/T240-dump-restore.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/T240-dump-restore.sh b/test/T240-dump-restore.sh index 0870ff92..374db5c2 100755 --- a/test/T240-dump-restore.sh +++ b/test/T240-dump-restore.sh @@ -322,6 +322,19 @@ EOF test_expect_equal_file EXPECTED OUTPUT +test_begin_subtest 'dumping large queries' +test_subtest_known_broken +# This value repeat was found experimentally by binary search. The +# config value after URL encoding is exactly 4096 bytes, which +# suggests a buffer size bug. +repeat=1329 +notmuch config set query.big "$(seq -s' ' $repeat)" +notmuch dump --include=config > OUTPUT +notmuch config set query.big '' +printf "#notmuch-dump batch-tag:3 config\n#@ query.big " > EXPECTED +seq -s'%20' $repeat >> EXPECTED +test_expect_equal_file EXPECTED OUTPUT + test_begin_subtest 'roundtripping random message-ids and tags' ${TEST_DIRECTORY}/random-corpus --config-path=${NOTMUCH_CONFIG} \ -- 2.25.1