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

Fixes crashing under a squashfuse_ll read-only mount #12301

Merged
merged 4 commits into from
May 9, 2024

Conversation

hotpxl
Copy link
Contributor

@hotpxl hotpxl commented May 9, 2024

As described in #12300 , pytest crashes with OSError: [Errno 38] Function not implemented when it's run under a squashfuse_ll mountpoint. the exception comes from within

_pytest/assertion/rewrite.py:1102: in try_makedirs
    os.makedirs(cache_dir, exist_ok=True)

this is because squashfuse_ll returns ENOSYS instead of EROFS for a read-only filesystem, which pytest doesn't know how to handle. This change adds handling of the error code.

closes #12300

Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

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

Looks good!

Can you please also update test_try_makedirs for this case? Thanks!

@nicoddemus nicoddemus merged commit 5af46f3 into pytest-dev:main May 9, 2024
23 of 24 checks passed
@nicoddemus nicoddemus added the backport 8.2.x Apply on merged PRs, backports the changes to the 8.2.x branch label May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 8.2.x Apply on merged PRs, backports the changes to the 8.2.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crashing under a squashfuse_ll read-only mount
2 participants