From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id APNiHdPI5F7KBwAA0tVLHw (envelope-from ) for ; Sat, 13 Jun 2020 12:38:43 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 6ChJGdPI5F5JRQAA1q6Kng (envelope-from ) for ; Sat, 13 Jun 2020 12:38:43 +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 DDFEE940655 for ; Sat, 13 Jun 2020 12:38:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id A672D6DE139D; Sat, 13 Jun 2020 05:38:35 -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 2Q0GCKP7x1Av; Sat, 13 Jun 2020 05:38:34 -0700 (PDT) Received: from arlo.cworth.org (localhost [IPv6:::1]) by arlo.cworth.org (Postfix) with ESMTP id 27C756DE138C; Sat, 13 Jun 2020 05:38:34 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 85D096DE138C for ; Sat, 13 Jun 2020 05:38:32 -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 opY6f2P-MJNB for ; Sat, 13 Jun 2020 05:38:30 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 4DD576DE1386 for ; Sat, 13 Jun 2020 05:38:30 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.92) (envelope-from ) id 1jk5QN-0003Rf-5N; Sat, 13 Jun 2020 08:38:15 -0400 Received: (nullmailer pid 248214 invoked by uid 1000); Sat, 13 Jun 2020 12:38:13 -0000 From: David Bremner To: Tomi Ollila , Anton Khirnov , notmuch@notmuchmail.org Subject: [PATCH] wip test for id:20200509050526.23148-1-anton@khirnov.net Date: Sat, 13 Jun 2020 09:38:08 -0300 Message-Id: <20200613123808.248149-1-david@tethera.net> X-Mailer: git-send-email 2.27.0 In-Reply-To: References: 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 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-Spam-Score: 1.49 X-TUID: vqrOgMp7OX9/ --- 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