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

test: skip if the namespace cannot be set up due to permissions or if python3 is too old #485

Merged
merged 2 commits into from
Aug 26, 2024

Conversation

bluca
Copy link
Member

@bluca bluca commented Aug 8, 2024

On some build systems, like Debian's, the tests do not have permissions to create new namespaces, so skip gracefully in that case

Follow-up for 8e17f09

@bluca bluca changed the title test: skip if the namespace cannot be set up due to permissions test: skip if the namespace cannot be set up due to permissions or if python3 is too old Aug 8, 2024
@jrybar-rh
Copy link
Member

@mrc0mmand Skip or fail the test if the user doesn't have permission to run it?

@bluca
Copy link
Member Author

bluca commented Aug 22, 2024

Let's not fail please, as it breaks package builds. Hit this issue after uploading the new version to Debian. We skip tests that require privileges in systemd too.

test/wrapper.py Outdated Show resolved Hide resolved
@mrc0mmand
Copy link
Member

Yeah, I think skipping the tests in such case is reasonable.

On some build systems, like Debian's, the tests do not have permissions to
create new namespaces, so skip gracefully in that case

Follow-up for 8e17f09
It was added in Python 3.12 which is very recent, so skip
gracefully if it is not available, like on the current
Debian stable or Ubuntu Jammy

https://docs.python.org/3/library/os.html#os.unshare
@jrybar-rh jrybar-rh merged commit a45a2a1 into polkit-org:main Aug 26, 2024
38 checks passed
@bluca bluca deleted the skip_tests_perms branch August 26, 2024 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants