unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] test: add known_broken test for dumping large stored queries
@ 2020-04-12 17:34 David Bremner
  2020-04-12 20:39 ` David Bremner
                   ` (3 more replies)
  0 siblings, 4 replies; 21+ messages in thread
From: David Bremner @ 2020-04-12 17:34 UTC (permalink / raw)
  To: notmuch

'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

^ permalink raw reply related	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2020-04-13 23:04 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-12 17:34 [PATCH] test: add known_broken test for dumping large stored queries David Bremner
2020-04-12 20:39 ` David Bremner
2020-04-13  2:10 ` David Bremner
2020-04-13  2:10   ` [PATCH 1/5] util/zlib-extra.c: don't pass NULL to gzerror David Bremner
2020-04-13  2:10   ` [PATCH 2/5] status: add print_status_gzbytes David Bremner
2020-04-13  2:10   ` [PATCH 3/5] cli/dump: define GZPRINTF macro and use it in place of gzprintf David Bremner
2020-04-13  8:52     ` Tomi Ollila
2020-04-13 11:21       ` David Bremner
2020-04-13 11:37         ` David Bremner
2020-04-13  2:10   ` [PATCH 4/5] cli/dump: define GZPUTS and use it in notmuch-dump David Bremner
2020-04-13  2:10   ` [PATCH 5/5] cli/dump: replace use of gzprintf with gzputs for config values David Bremner
2020-04-13  8:47 ` [PATCH] test: add known_broken test for dumping large stored queries Tomi Ollila
2020-04-13  9:43 ` Thomas Schneider
2020-04-13 12:36   ` [PATCH 1/6] " David Bremner
2020-04-13 12:36     ` [PATCH 2/6] util/zlib-extra.c: don't pass NULL to gzerror David Bremner
2020-04-13 12:36     ` [PATCH 3/6] status: add print_status_gzbytes David Bremner
2020-04-13 12:36     ` [PATCH 4/6] cli/dump: define GZPRINTF macro and use it in place of gzprintf David Bremner
2020-04-13 14:12       ` Tomi Ollila
2020-04-13 12:36     ` [PATCH 5/6] cli/dump: define GZPUTS and use it in notmuch-dump David Bremner
2020-04-13 12:36     ` [PATCH 6/6] cli/dump: replace use of gzprintf with gzputs for config values David Bremner
2020-04-13 23:03     ` [PATCH 1/6] test: add known_broken test for dumping large stored queries David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).