[LTP] [PATCH 1/1] kirk: Update to v3.2
Li Wang
liwang@redhat.com
Thu Jan 15 10:57:41 CET 2026
> > ===== Log =====
> > # ./kirk --env LTPROOT=/root/ltp-install/ --run-suite sched -v
> > --json-report sched.json
> > Host information
> >
> > Hostname: dell-per430-09.gsslab.pek2.redhat.com
> > Python: 3.12.12 (main, Jan 6 2026, 00:00:00) [GCC 14.3.1 20250617
> > (Red Hat 14.3.1-2)]
> > Directory: /tmp/kirk.root/tmp1a062qkt
> >
> > Connecting to SUT: default
> > Error: LTP folder doesn't exist: /opt/ltp
> >
> > Disconnecting from SUT: default
> > Session stopped
> >
> > ==============
> >
>
> This is strange. The --env feature is taking info from shell and
> updating its dictionary if it has been defined.
>
> This is exactly why this ticket has been open. Too much confusion
> between shell variables and --env parameter. We can't have 2 different
> ways to set internal variables.
>
> https://github.com/linux-test-project/kirk/issues/72
After playing with the ltp.py for a while and assisted by GPT5,
I drafted a simple patch like below, it works from my test, can
Do you think it's worth opening a PR to Kirk?
--- a/libkirk/ltp.py
+++ b/libkirk/ltp.py
@@ -50,7 +50,7 @@ class LTPFramework(Framework):
self,
max_runtime: float = 0.0,
timeout: float = 30.0,
- env: dict = {},
+ env: Optional[dict] = None,
) -> None:
"""
:param max_runtime: filter out all tests above this time value
@@ -63,7 +63,8 @@ class LTPFramework(Framework):
self._logger = logging.getLogger("libkirk.ltp")
self._cmd_matcher = re.compile(r'(?:"[^"]*"|\'[^\']*\'|\S+)')
self._max_runtime = max_runtime
- self._root = os.environ.get("LTPROOT", "/opt/ltp")
+ env = env or {}
+ self._root = env.get("LTPROOT") or os.environ.get("LTPROOT")
or "/opt/ltp"
self._tc_folder = os.path.join(self._root, "testcases", "bin")
self._env = {
@@ -79,8 +80,7 @@ class LTPFramework(Framework):
if timeout:
self._env["LTP_TIMEOUT_MUL"] = str((timeout * 0.9) / 300.0)
- if env:
- self._env.update(env)
+ self._env.update(env)
async def _read_path(self, channel: ComChannel) -> Dict[str, str]:
"""
--
Regards,
Li Wang
More information about the ltp
mailing list