]> www.infradead.org Git - users/jedix/linux-maple.git/commit
verification/dot2k: Fix template directory detection
authorGabriele Monaco <gmonaco@redhat.com>
Fri, 27 Dec 2024 14:47:45 +0000 (15:47 +0100)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Fri, 27 Dec 2024 17:32:54 +0000 (12:32 -0500)
commit6c432b56a16a0727561211a137f37ec47f96f1d0
treed14875b89006af920444a647c4d303489199fc21
parent4bbf9020becbfd8fc2c3da790855b7042fad455b
verification/dot2k: Fix template directory detection

dot2k can be run as installed (e.g. make install) or from the kernel
tree. In the former case it looks for templates in a known location; in
the latter, the PWD has to be `<linux>/tools/verification` to properly
import python modules. The current version looks for the template
in a wrong directory in this latter case.

This patch adjusts the directory where dot2k looks for templates if run
from the kernel tree (i.e. not installed).
Additionally we fix a few simple pylint warnings in boolean expressions.

Cc: Juri Lelli <juri.lelli@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: John Kacur <jkacur@redhat.com>
Link: https://lore.kernel.org/20241227144752.362911-2-gmonaco@redhat.com
Signed-off-by: Gabriele Monaco <gmonaco@redhat.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
tools/verification/dot2/dot2k.py