]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
verification/dot2: Improve dot parser robustness
authorGabriele Monaco <gmonaco@redhat.com>
Thu, 17 Oct 2024 06:42:39 +0000 (08:42 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 19:04:03 +0000 (20:04 +0100)
commit67f21fdd35a90cf9db8be7f3ae8703a191e95b6e
treedcd6240ddef05b0471eeab03e90063dc83551f4d
parent98bf83f0e44d1fe922b0c6b8220735a51995876d
verification/dot2: Improve dot parser robustness

[ Upstream commit 571f8b3f866a6d990a50fe5c89fe0ea78784d70b ]

This patch makes the dot parser used by dot2c and dot2k slightly more
robust, namely:
* allows parsing files with the gv extension (GraphViz)
* correctly parses edges with any indentation
    * used to work only with a single character (e.g. '\t')
Additionally it fixes a couple of warnings reported by pylint such as
wrong indentation and comparison to False instead of `not ...`

Link: https://lore.kernel.org/20241017064238.41394-2-gmonaco@redhat.com
Signed-off-by: Gabriele Monaco <gmonaco@redhat.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/verification/dot2/automata.py