--- 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 _______________________________________________ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch