Skip to content

Fixes crashing under a squashfuse_ll read-only mount#12301

Merged
nicoddemus merged 4 commits intopytest-dev:mainfrom
hotpxl:main
May 9, 2024
Merged

Fixes crashing under a squashfuse_ll read-only mount#12301
nicoddemus merged 4 commits intopytest-dev:mainfrom
hotpxl:main

Conversation

@hotpxl
Copy link
Copy Markdown
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
Copy Markdown
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!

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.

Crashing under a squashfuse_ll read-only mount

2 participants