From: David Bremner <david@tethera.net>
To: Tomi Ollila <tomi.ollila@iki.fi>,
Anton Khirnov <anton@khirnov.net>,
notmuch@notmuchmail.org
Subject: [PATCH] wip test for id:20200509050526.23148-1-anton@khirnov.net
Date: Sat, 13 Jun 2020 09:38:08 -0300 [thread overview]
Message-ID: <20200613123808.248149-1-david@tethera.net> (raw)
In-Reply-To: <m2pna6ws5e.fsf@guru.guru-group.fi>
---
I'm not the best person to write a good commit message here; probably
some Anton's patch 1/2 message should be moved here.
That patch should apply after this one, and remote the
test_subtest_known_broken. Of course someone is welcome to improve the
test and inline comments.
bindings/python-cffi/tests/test_database.py | 7 +++++++
test/T391-python-cffi.sh | 1 +
2 files changed, 8 insertions(+)
diff --git a/bindings/python-cffi/tests/test_database.py b/bindings/python-cffi/tests/test_database.py
index e3a8344d..df504daa 100644
--- a/bindings/python-cffi/tests/test_database.py
+++ b/bindings/python-cffi/tests/test_database.py
@@ -324,3 +324,10 @@ class TestQuery:
threads = db.threads('*')
thread = next(threads)
assert isinstance(thread, notmuch2.Thread)
+
+ def test_memory_bug(self, db):
+ # check early destroy bug reported in id:20200509050526.23148-1-anton@khirnov.net
+ t = next(db.threads('*'))
+ msgs = list(zip(t.toplevel(), t.toplevel()))
+ msgs = list(zip(t.toplevel(), t.toplevel()))
+ assert len(msgs) != 0
diff --git a/test/T391-python-cffi.sh b/test/T391-python-cffi.sh
index f961069b..9407cc81 100755
--- a/test/T391-python-cffi.sh
+++ b/test/T391-python-cffi.sh
@@ -8,6 +8,7 @@ fi
test_begin_subtest "python cffi tests"
+test_subtest_known_broken
pytest_dir=$NOTMUCH_BUILDDIR/bindings/python-cffi/build/stage
printf "[pytest]\nminversion = 3.0\naddopts = -ra\n" > $pytest_dir/pytest.ini
test_expect_success "(cd $pytest_dir && ${NOTMUCH_PYTHON} -m pytest --log-file=$TMP_DIRECTORY/test.output)"
--
2.27.0
next prev parent reply other threads:[~2020-06-13 12:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-09 5:05 [PATCH 1/2] python/notmuch2: do not destroy messages owned by a query Anton Khirnov
2020-05-09 5:05 ` [PATCH 2/2] python/notmuch2: add bindings for the database config strings Anton Khirnov
2020-05-21 22:45 ` Floris Bruynooghe
2020-05-21 7:08 ` [PATCH 1/2] python/notmuch2: do not destroy messages owned by a query Anton Khirnov
2020-05-21 11:13 ` David Bremner
2020-06-10 21:02 ` Tomi Ollila
2020-06-13 12:38 ` David Bremner [this message]
2020-05-21 22:17 ` Floris Bruynooghe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200613123808.248149-1-david@tethera.net \
--to=david@tethera.net \
--cc=anton@khirnov.net \
--cc=notmuch@notmuchmail.org \
--cc=tomi.ollila@iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).