linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gabriele Monaco <gmonaco@redhat.com>
To: Nam Cao <namcao@linutronix.de>
Cc: john.ogness@linutronix.de, Steven Rostedt <rostedt@goodmis.org>,
	 linux-trace-kernel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 04/22] verification/dot2k: Make it possible to invoke dot2k without installation
Date: Fri, 11 Apr 2025 11:23:25 +0200	[thread overview]
Message-ID: <4b4c9ac8411e6398b7d4487541d978f908785d27.camel@redhat.com> (raw)
In-Reply-To: <caa6a7668f958c68fc7b8a40256e3edf3f11ae99.1744355018.git.namcao@linutronix.de>



On Fri, 2025-04-11 at 09:37 +0200, Nam Cao wrote:
> Without installation, dot2k doesn't work:
> 
> namcao@yellow:~/linux/tools/verification$ python3 ./dot2/dot2k
> Traceback (most recent call last):
>   File "/home/namcao/linux/tools/verification/./dot2/dot2k", line 12,
> in <module>
>     from dot2.dot2k import dot2k
> ModuleNotFoundError: No module named 'dot2'
> 
> Installing dot2k to the system is not always desirable. Sometimes it
> is not
> even possible (e.g. no root permission).
> 
> Restructure the files to make it work without installing.
> 
> Signed-off-by: Nam Cao <namcao@linutronix.de>

Mmh, the workflow

pushd tools/verification
...
popd

has always been working in my case, but probably that's because I have
PYTHONPATH="." , not sure how much of a good practice that is.

Anyway, since you're already moving things around in 9/22
("verification/dot2k: Prepare the frontend for LTL inclusion"), does it
make sense to keep the commits separated? Or you could directly move to
rvgen here and just add the ltl related changes in the later commit.

Also, after your changes on my system, I can run the script from the
kernel directory too, which is much better than having to cd to
tools/verification .
If that's something portable, I'd change the default definition of
monitor_templates_dir and allow the user to run the script only from
the kernel root.

What do you think?

Thanks,
Gabriele

> ---
>  tools/verification/dot2/Makefile               | 6 +++---
>  tools/verification/dot2/{ => dot2}/automata.py | 0
>  tools/verification/dot2/{ => dot2}/dot2c.py    | 0
>  tools/verification/dot2/{ => dot2}/dot2k.py    | 0
>  4 files changed, 3 insertions(+), 3 deletions(-)
>  rename tools/verification/dot2/{ => dot2}/automata.py (100%)
>  rename tools/verification/dot2/{ => dot2}/dot2c.py (100%)
>  rename tools/verification/dot2/{ => dot2}/dot2k.py (100%)
> 
> diff --git a/tools/verification/dot2/Makefile
> b/tools/verification/dot2/Makefile
> index 021beb07a521..7a2ec30014b0 100644
> --- a/tools/verification/dot2/Makefile
> +++ b/tools/verification/dot2/Makefile
> @@ -16,10 +16,10 @@ clean:
>  
>  .PHONY: install
>  install:
> -	$(INSTALL) automata.py -D -m 644
> $(DESTDIR)$(PYLIB)/dot2/automata.py
> -	$(INSTALL) dot2c.py -D -m 644
> $(DESTDIR)$(PYLIB)/dot2/dot2c.py
> +	$(INSTALL) dot2/automata.py -D -m 644
> $(DESTDIR)$(PYLIB)/dot2/automata.py
> +	$(INSTALL) dot2/dot2c.py -D -m 644
> $(DESTDIR)$(PYLIB)/dot2/dot2c.py
>  	$(INSTALL) dot2c -D -m 755 $(DESTDIR)$(bindir)/
> -	$(INSTALL) dot2k.py -D -m 644
> $(DESTDIR)$(PYLIB)/dot2/dot2k.py
> +	$(INSTALL) dot2/dot2k.py -D -m 644
> $(DESTDIR)$(PYLIB)/dot2/dot2k.py
>  	$(INSTALL) dot2k -D -m 755 $(DESTDIR)$(bindir)/
>  
>  	mkdir -p ${miscdir}/
> diff --git a/tools/verification/dot2/automata.py
> b/tools/verification/dot2/dot2/automata.py
> similarity index 100%
> rename from tools/verification/dot2/automata.py
> rename to tools/verification/dot2/dot2/automata.py
> diff --git a/tools/verification/dot2/dot2c.py
> b/tools/verification/dot2/dot2/dot2c.py
> similarity index 100%
> rename from tools/verification/dot2/dot2c.py
> rename to tools/verification/dot2/dot2/dot2c.py
> diff --git a/tools/verification/dot2/dot2k.py
> b/tools/verification/dot2/dot2/dot2k.py
> similarity index 100%
> rename from tools/verification/dot2/dot2k.py
> rename to tools/verification/dot2/dot2/dot2k.py


  reply	other threads:[~2025-04-11  9:23 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-11  7:37 [PATCH v2 00/22] RV: Linear temporal logic monitors for RT application Nam Cao
2025-04-11  7:37 ` [PATCH v2 01/22] rv: Fix out-of-bound memory access in rv_is_container_monitor() Nam Cao
2025-04-11  7:37 ` [PATCH v2 02/22] rv: Add #undef TRACE_INCLUDE_FILE Nam Cao
2025-04-11  7:37 ` [PATCH v2 03/22] rv: Let the reactors take care of buffers Nam Cao
2025-04-11  8:39   ` Gabriele Monaco
2025-04-15  9:32   ` Petr Mladek
2025-04-15  9:53     ` Nam Cao
2025-04-11  7:37 ` [PATCH v2 04/22] verification/dot2k: Make it possible to invoke dot2k without installation Nam Cao
2025-04-11  9:23   ` Gabriele Monaco [this message]
2025-04-11 14:04     ` Nam Cao
2025-04-11 14:56       ` Gabriele Monaco
2025-04-11  7:37 ` [PATCH v2 05/22] verification/dot2k: Make a separate dot2k_templates/Kconfig_container Nam Cao
2025-04-11  8:54   ` Gabriele Monaco
2025-04-11  7:37 ` [PATCH v2 06/22] verification/dot2k: Remove __buff_to_string() Nam Cao
2025-04-11  8:53   ` Gabriele Monaco
2025-04-11  7:37 ` [PATCH v2 07/22] verification/dot2k: Replace is_container() hack with subparsers Nam Cao
2025-04-11  8:56   ` Gabriele Monaco
2025-04-11  7:37 ` [PATCH v2 08/22] rv: rename CONFIG_DA_MON_EVENTS to CONFIG_RV_MON_EVENTS Nam Cao
2025-04-11 10:37   ` Gabriele Monaco
2025-04-11  7:37 ` [PATCH v2 09/22] verification/dot2k: Prepare the frontend for LTL inclusion Nam Cao
2025-04-11  7:37 ` [PATCH v2 10/22] Documentation/rv: Prepare monitor synthesis document " Nam Cao
2025-04-11  9:28   ` Gabriele Monaco
2025-04-11  7:37 ` [PATCH v2 11/22] verification/rvgen: Prepare the templates " Nam Cao
2025-04-11  7:37 ` [PATCH v2 12/22] verification/rvgen: Restructure the classes to prepare " Nam Cao
2025-04-11  7:37 ` [PATCH v2 13/22] rv: Add support for LTL monitors Nam Cao
2025-04-11 11:17   ` Gabriele Monaco
2025-04-11 14:15     ` Nam Cao
2025-04-15 13:22   ` Gabriele Monaco
2025-04-16  3:55     ` Nam Cao
2025-04-11  7:37 ` [PATCH v2 14/22] rv: Add rtapp container monitor Nam Cao
2025-04-11  7:37 ` [PATCH v2 15/22] x86/tracing: Remove redundant trace_pagefault_key Nam Cao
2025-04-11  7:37 ` [PATCH v2 16/22] x86/tracing: Move page fault trace points to generic Nam Cao
2025-04-11  7:37 ` [PATCH v2 17/22] arm64: mm: Add page fault trace points Nam Cao
2025-04-11  7:37 ` [PATCH v2 18/22] riscv: " Nam Cao
2025-04-11  7:37 ` [PATCH v2 19/22] rv: Add rtapp_pagefault monitor Nam Cao
2025-04-15 12:31   ` Gabriele Monaco
2025-04-15 12:38     ` Nam Cao
2025-04-15 12:47       ` Gabriele Monaco
2025-04-11  7:37 ` [PATCH v2 20/22] rv: Add rtapp_sleep monitor Nam Cao
2025-04-11  7:37 ` [PATCH v2 21/22] rv: Add documentation for rtapp monitor Nam Cao
2025-04-15 13:12   ` Gabriele Monaco
2025-04-16  4:37     ` Nam Cao
2025-04-11  7:37 ` [PATCH v2 22/22] rv: Allow to configure the number of per-task monitor Nam Cao
2025-04-11 12:31   ` Gabriele Monaco

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4b4c9ac8411e6398b7d4487541d978f908785d27.camel@redhat.com \
    --to=gmonaco@redhat.com \
    --cc=john.ogness@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=namcao@linutronix.de \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).