]> granicus.if.org Git - graphviz/commitdiff
add a test case for b15.gv crash
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 18 Jun 2022 22:05:05 +0000 (15:05 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 23 Jun 2022 00:11:37 +0000 (17:11 -0700)
Unfortunately the xfail in this commit cannot be marked `strict=True` because
the ASan CI job turns the deterministic crash of this test case into a
`exit(1)`.

Gitlab: #827

tests/test_regression.py

index 96456e63b18455e3568de70031244e9f09d653af..cce35d8af392be6bfcb176cf1397e58ab1d27f1b 100644 (file)
@@ -363,6 +363,20 @@ def test_797():
   # the escape sequences should have been preserved
   assert "&amp; &amp;" in output
 
+@pytest.mark.xfail()
+def test_827():
+  """
+  Graphviz should not crash when processing the b15.gv example
+  https://gitlab.com/graphviz/graphviz/-/issues/827
+  """
+
+  b15gv = Path(__file__).parent / "graphs/b15.gv"
+  assert b15gv.exists(), "missing test case file"
+
+  ret = subprocess.call(["dot", "-Tsvg", "-o", os.devnull, b15gv])
+
+  assert ret == 1, "Graphviz crashed when processing b15.gv"
+
 def test_1221():
   """
   assigning a node to two clusters with newrank should not cause a crash