From 6f1f134b7383c293ac946203825ae6935c641ed7 Mon Sep 17 00:00:00 2001 From: Rob Hart Date: Tue, 8 Dec 2020 08:29:53 -0800 Subject: [PATCH] Regression test for issue 1902 Edit from Matt: Added `xfail` marker as I have reordered the commits to put this test case introduction before its fix, as well as aligning with current Pylint requirements. Gitlab: #1902 Co-authored-by: Matthew Fernandez --- rtest/1902.dot | 10 ++++++++++ rtest/test_regression.py | 15 +++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 rtest/1902.dot diff --git a/rtest/1902.dot b/rtest/1902.dot new file mode 100644 index 000000000..634fd0305 --- /dev/null +++ b/rtest/1902.dot @@ -0,0 +1,10 @@ +digraph { + nslimit1=0 + subgraph cluster { + subgraph cluster { + a1 ->a2 a3 + } + b1 + b2->a1 + } -> a3 +} \ No newline at end of file diff --git a/rtest/test_regression.py b/rtest/test_regression.py index f85396fca..43a62646b 100644 --- a/rtest/test_regression.py +++ b/rtest/test_regression.py @@ -791,6 +791,21 @@ def test_1898(): # has been reintroduced dot("svg", input) +@pytest.mark.xfail(strict=not is_ndebug_defined()) # FIXME +def test_1902(): + ''' + test a segfault from https://gitlab.com/graphviz/graphviz/-/issues/1902 has + not reappeared + ''' + + # locate our associated test case in this directory + input = os.path.join(os.path.dirname(__file__), '1902.dot') + assert os.path.exists(input), 'unexpectedly missing test case' + + # ask Graphviz to process it, which should generate a segfault if this bug + # has been reintroduced + subprocess.check_call(['dot', '-Tsvg', '-o', os.devnull, input]) + # root directory of this checkout ROOT = Path(__file__).parent.parent.resolve() -- 2.40.0