Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport][ipa-4-8] ipatests: Allow zero-length arguments #4239

Closed
wants to merge 1 commit into from

Conversation

abbra
Copy link
Contributor

@abbra abbra commented Feb 14, 2020

This PR was opened automatically because PR #4149 was pushed to master and backport to ipa-4-8 is required.

Currently, such arguments are eaten by 'ipa-run-tests' script as they
are not quoted.

For example, running ipa-run-tests -k ''
results in the actual invocation would be like as:
['/bin/sh',
 '--norc',
 '--noprofile',
 '-c',
 '--',
 "/usr/bin/python3 -c 'import sys,pytest;sys.exit(pytest.main())' -o "
 'cache_dir=/tmp/pytest-of-root/pytest-12/test_ipa_run_tests_empty_expression0/.pytest_cache '
 '--confcutdir=/usr/lib64/python3/site-packages/ipatests -k ']

Note: expressions or marks could be empty as a result of the building
of command line args by more high-level tools, scripts, etc.

So, a short-termed solution is the quotting of zero-length arguments.

Fixes: https://pagure.io/freeipa/issue/8173
Signed-off-by: Stanislav Levin <slev@altlinux.org>
@abbra abbra added the ack Pull Request approved, can be merged label Feb 14, 2020
@abbra
Copy link
Contributor Author

abbra commented Feb 14, 2020

PR was ACKed automatically because this is backport of PR #4149. Wait for CI to finish before pushing. In case of questions or problems contact @stanislavlevin who is author of the original PR.

@abbra abbra added the pushed Pull Request has already been pushed label Feb 16, 2020
@abbra
Copy link
Contributor Author

abbra commented Feb 16, 2020

ipa-4-8:

  • c35c066 ipatests: Allow zero-length arguments

@abbra abbra closed this Feb 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ack Pull Request approved, can be merged pushed Pull Request has already been pushed
Projects
None yet
2 participants