[LTP] [PATCH 1/1] kirk: Update to v3.2

Li Wang liwang@redhat.com
Thu Jan 15 11:08:54 CET 2026


On Thu, Jan 15, 2026 at 6:04 PM Petr Vorel <pvorel@suse.cz> wrote:
>
> Hi Li,
>
> > > > ===== 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")
>
> Do I understand you want to get back --env? Would it be too hard for you to use
> shell environment variable? The purpose was to simplify the code (Andrea's
> concern, which I don't object because he does all the kirk work).

No, I don't want to get back --env, since before Andrea replied to me
I've beendebugging a while and found a way to make --env work.

So just let him know it's not too complicated to support both way,
I would leave to him to make the final decision :).

> Also, I'm sorry to merge update without your ack, next time I'll wait for the
> testing.

No problem, we're still using the stable LTP version, so today I'm just testing
Kirk-3.2 to see if an upgrade is possible.

-- 
Regards,
Li Wang



More information about the ltp mailing list