pytest/segfault: segfault with nameless element
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Fri, 12 Apr 2019 23:29:15 +0000 (11:29 +1200)
committerNoel Power <npower@samba.org>
Tue, 23 Apr 2019 18:00:13 +0000 (18:00 +0000)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
python/samba/tests/segfault.py
selftest/knownfail.d/python-segfaults

index 38dcb5c..b95c1ef 100644 (file)
@@ -124,3 +124,13 @@ class SegfaultTests(samba.tests.TestCase):
             registry.open_ldb('', credentials=42)
         except ldb.LdbError as e:
             print("failed with %s" % e)
+
+    @segfault_detector
+    def test_ldb_add_nameless_element(self):
+        m = ldb.Message()
+        e = ldb.MessageElement('q')
+        try:
+            m.add(e)
+        except ldb.LdbError:
+            pass
+        str(m)
index c8331d9..bc2a716 100644 (file)
@@ -4,3 +4,4 @@ samba.tests.segfault.samba.tests.segfault.SegfaultTests.test_hive_open_ldb
 samba.tests.segfault.samba.tests.segfault.SegfaultTests.test_net_replicate_chunk_1
 samba.tests.segfault.samba.tests.segfault.SegfaultTests.test_net_replicate_init__1
 samba.tests.segfault.samba.tests.segfault.SegfaultTests.test_net_replicate_init__3
+samba.tests.segfault.samba.tests.segfault.SegfaultTests.test_ldb_add_nameless_element