Skip to content

Remove --env option#89

Open
acerv wants to merge 1 commit intolinux-test-project:masterfrom
acerv:remove_env_option
Open

Remove --env option#89
acerv wants to merge 1 commit intolinux-test-project:masterfrom
acerv:remove_env_option

Conversation

@acerv
Copy link
Collaborator

@acerv acerv commented Feb 11, 2026

Remove --env option that was created to support multiple frameworks. Now that we support LTP environment only, we can fetch them directly from the OS environment like it was for runltp.

For instance, this will permits to do:

MYENV1=val1 MYENV2=val2 kirk --run-suite syscalls

instead of:

kirk --run-suite syscalls --env MYENV1=val1:MYENV2=val2

Closes: #72
Signed-off-by: Andrea Cervesato andrea.cervesato@suse.com
Tested-by: Li Wang mailto:liwang@redhat.com
Reviewed-by: Petr Vorel pvorel@suse.cz

@acerv acerv requested review from pevik and wangli5665 February 11, 2026 10:50
@acerv acerv self-assigned this Feb 11, 2026
@acerv acerv added the enhancement New feature or request label Feb 11, 2026
@acerv
Copy link
Collaborator Author

acerv commented Feb 11, 2026

@wangli5665 it would be nice if you can provide a feedback after testing this PR. Thanks!

@wangli5665
Copy link
Member

Tested-by: Li Wang liwang@redhat.com

@acerv acerv force-pushed the remove_env_option branch from 814cce8 to 64ce6ca Compare February 13, 2026 07:45
@acerv acerv requested a review from metan-ucw February 13, 2026 07:46
Copy link
Member

@pevik pevik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There will be always some variable missing (now it is LTP_NET_FEATURES_IGNORE_PERFORMANCE_FAILURE) if user uses older kirk than new variable in LTP Can't we just pass to SUT all variables which python3 sees and just filter few ones (UID, PWD)?

@acerv
Copy link
Collaborator Author

acerv commented Feb 13, 2026

There will be always some variable missing (now it is LTP_NET_FEATURES_IGNORE_PERFORMANCE_FAILURE) if user uses older kirk than new variable in LTP Can't we just pass to SUT all variables which python3 sees and just filter few ones (UID, PWD)?

This is exactly why I asked a review about the code. I'm puzzled a bit due to the way we can inject environment variables to the tests binaries.

Either we inject all vars and remove a few ones, or we just inject the ones we know. Pros & Cons I guess. Inside a CI we might risk to expose sensitive environment variables to the tests, which is not the best.

@pevik
Copy link
Member

pevik commented Feb 13, 2026

Because kirk is in a separate project I would vote to inject all variables and filter these which would be problematic to inject.

@metan-ucw
Copy link
Member

metan-ucw commented Feb 13, 2026

Given that all newly added variables are prefixed with 'LTP_' we can easily filter them by prefix.

@acerv
Copy link
Collaborator Author

acerv commented Feb 13, 2026

Given that all newly added variables are prefixed with 'LTP_' we can easily filter them by prefix.

This is a good idea, I can keep non-standard prefix keys inside a lookup array and filter all vars starting with LTP_

@acerv acerv force-pushed the remove_env_option branch from 64ce6ca to 2ee7db1 Compare February 13, 2026 10:42
@pevik
Copy link
Member

pevik commented Feb 13, 2026

Given that all newly added variables are prefixed with 'LTP_' we can easily filter them by prefix.

With 4 (5) non-LTP_ exceptions:

  • KCONFIG_PATH
  • KCONFIG_SKIP_CHECK
  • LTPROOT
  • PATH (not sure, but we need to allow to add special paths in SUT)
  • TMPDIR

@acerv
Copy link
Collaborator Author

acerv commented Feb 13, 2026

Given that all newly added variables are prefixed with 'LTP_' we can easily filter them by prefix.

With 4 (5) non-LTP_ exceptions:

* `KCONFIG_PATH`

* `KCONFIG_SKIP_CHECK`

* `LTPROOT`

* `PATH` (not sure, but we need to allow to add special paths in SUT)

* `TMPDIR`

I already sent a new commit for this

Remove --env option that was created to support multiple frameworks.
Now that we support LTP environment only, we can fetch them directly
from the OS environment like it was for `runltp`.

For instance, this will permits to do:

	MYENV1=val1 MYENV2=val2 kirk --run-suite syscalls

instead of:

	kirk --run-suite syscalls --env MYENV1=val1:MYENV2=val2

Closes: linux-test-project#72
Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
@acerv acerv force-pushed the remove_env_option branch from 2ee7db1 to 475e32e Compare February 13, 2026 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fetch env variables from command line

4 participants