From: John Kacur <jkacur@redhat.com>
To: Sana Sharma <sansshar@redhat.com>
Cc: linux-rt-users@vger.kernel.org
Subject: Re: [PATCH v2] rteval: Fixed hardcoded paths in class TestCpusetManagerCLIIntegration
Date: Tue, 3 Nov 2026 13:28:23 -0500 [thread overview]
Message-ID: <20261103182823.120528-1-jkacur@redhat.com> (raw)
In-Reply-To: <auI9GfqN-g0YtJhD@fedora>
On Wed, 28 Oct 2026 at 14:21:13 -0400, Sana Sharma wrote:
> [PATCH v2] rteval: Fixed hardcoded paths in class TestCpusetManagerCLIIntegration
Thanks for the patch Sana. Good catch dropping the hardcoded
/home/jkacur path - it would only ever have worked on my machine - and
the switch to pathlib matches what we already do in
tests/test_stressng.py. Two small things to fix, then I'll take it.
1. Don't compute the repo root twice.
> +sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
...
> + srcdir = str(Path(__file__).resolve().parent.parent)
The same str(Path(__file__).resolve().parent.parent) is evaluated once
here and then again as the class attribute. Name it once at module scope
and reuse it:
SRCDIR = str(Path(__file__).resolve().parent.parent)
sys.path.insert(0, SRCDIR)
and in the class:
srcdir = SRCDIR
It needs to stay at module level (not inside the class), because the
sys.path.insert has to run before the top-of-file "from rteval ..."
imports, and the class is not defined yet at that point.
2. Extra space after the comma.
> + [sys.executable, f"{self.srcdir}/rteval-cmd",
There are two spaces after "sys.executable," in each of these calls; it
should be one. pylint won't catch this (it dropped its whitespace checks
a few releases ago), but a formatter like ruff or black will flag and fix
it for you automatically, e.g.:
ruff format tests/test_cpusetmanager.py
With those addressed I'm happy to apply it.
John
prev parent reply other threads:[~2026-11-03 18:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-28 18:21 [PATCH v2] rteval: Fixed hardcoded paths in class TestCpusetManagerCLIIntegration Sana Sharma
2026-11-03 18:28 ` John Kacur [this message]
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=20261103182823.120528-1-jkacur@redhat.com \
--to=jkacur@redhat.com \
--cc=linux-rt-users@vger.kernel.org \
--cc=sansshar@redhat.com \
/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).