All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Li Wang <liwang@redhat.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/1] kirk: Update to v3.2
Date: Thu, 15 Jan 2026 11:03:57 +0100	[thread overview]
Message-ID: <20260115100357.GA445534@pevik> (raw)
In-Reply-To: <CAEemH2dyAQfuBwg9T1DJL9j_xYKLCC9TNQRobM1063smkdJpgQ@mail.gmail.com>

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).

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

Kind regards,
Petr

> 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]:
>          """

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2026-01-15 10:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-14 13:35 [LTP] [PATCH 1/1] kirk: Update to v3.2 Petr Vorel
2026-01-14 13:38 ` Andrea Cervesato via ltp
2026-01-15  8:08   ` Li Wang via ltp
2026-01-15  9:38     ` Andrea Cervesato via ltp
2026-01-15  9:57       ` Li Wang via ltp
2026-01-15 10:03         ` Petr Vorel [this message]
2026-01-15 10:08           ` Li Wang via ltp
2026-01-15 10:13         ` Andrea Cervesato via ltp
2026-01-15 10:34           ` Li Wang via ltp
2026-01-15 10:43             ` Andrea Cervesato via ltp
2026-01-15 13:02             ` Andrea Cervesato via ltp
2026-01-15 13:20               ` Li Wang via ltp

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=20260115100357.GA445534@pevik \
    --to=pvorel@suse.cz \
    --cc=liwang@redhat.com \
    --cc=ltp@lists.linux.it \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.