Skip to content

gh-126909: Fix running xattr tests on systems with lower limits #126930

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

Merged
merged 2 commits into from
Nov 18, 2024

Conversation

mgorny
Copy link
Contributor

@mgorny mgorny commented Nov 17, 2024

Modify the extended attribute tests to write fewer and smaller extended attributes, in order to fit within filesystems with total xattr limit of 1 KiB (e.g. ext4 with 1 KiB blocks). Previously, the test would write over 2 KiB, making it fail with ENOSPC on such systems.

Modify the extended attribute tests to write fewer and smaller extended
attributes, in order to fit within filesystems with total xattr limit
of 1 KiB (e.g. ext4 with 1 KiB blocks).  Previously, the test would
write over 2 KiB, making it fail with ENOSPC on such systems.
@picnixz
Copy link
Member

picnixz commented Nov 18, 2024

Can we have a dynamic limit instead? IIRC xfs supports block sizes of 512 bytes (which is the minimum). Is there a way to detect the underlying fs just in case? (I doubt anyone is using 512 bytes blocks but we never know...).

EDIT: NVM XFS does not impose a limit on xattr size (but can you confirm that I correctly understood the man page?)

@mgorny
Copy link
Contributor Author

mgorny commented Nov 18, 2024

EDIT: NVM XFS does not impose a limit on xattr size (but can you confirm that I correctly understood the man page?)

That's how I understand it — "no practical limit". FWIU, "the limit on bytes used in an EA value is the ceiling imposed by the VFS" refers to "VFS-imposed limits on attribute names and values are 255 bytes and 64 kB, respectively".

@vstinner vstinner merged commit 2c0a21c into python:main Nov 18, 2024
36 checks passed
@vstinner vstinner added needs backport to 3.12 only security fixes needs backport to 3.13 bugs and security fixes labels Nov 18, 2024
@miss-islington-app
Copy link

Thanks @mgorny for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Thanks @mgorny for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 18, 2024
…pythonGH-126930)

Modify the extended attribute tests to write fewer and smaller extended
attributes, in order to fit within filesystems with total xattr limit
of 1 KiB (e.g. ext4 with 1 KiB blocks).  Previously, the test would
write over 2 KiB, making it fail with ENOSPC on such systems.
(cherry picked from commit 2c0a21c)

Co-authored-by: Michał Górny <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Nov 18, 2024

GH-126964 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Nov 18, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 18, 2024
…pythonGH-126930)

Modify the extended attribute tests to write fewer and smaller extended
attributes, in order to fit within filesystems with total xattr limit
of 1 KiB (e.g. ext4 with 1 KiB blocks).  Previously, the test would
write over 2 KiB, making it fail with ENOSPC on such systems.
(cherry picked from commit 2c0a21c)

Co-authored-by: Michał Górny <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Nov 18, 2024

GH-126965 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Nov 18, 2024
@vstinner
Copy link
Member

Merged, thank you.

@mgorny mgorny deleted the xattr-test-limit-126909 branch November 18, 2024 13:17
@mgorny
Copy link
Contributor Author

mgorny commented Nov 18, 2024

Thanks!

vstinner pushed a commit that referenced this pull request Nov 18, 2024
GH-126930) (#126964)

gh-126909: Fix running xattr tests on systems with lower limits (GH-126930)

Modify the extended attribute tests to write fewer and smaller extended
attributes, in order to fit within filesystems with total xattr limit
of 1 KiB (e.g. ext4 with 1 KiB blocks).  Previously, the test would
write over 2 KiB, making it fail with ENOSPC on such systems.
(cherry picked from commit 2c0a21c)

Co-authored-by: Michał Górny <[email protected]>
vstinner pushed a commit that referenced this pull request Nov 18, 2024
GH-126930) (#126965)

gh-126909: Fix running xattr tests on systems with lower limits (GH-126930)

Modify the extended attribute tests to write fewer and smaller extended
attributes, in order to fit within filesystems with total xattr limit
of 1 KiB (e.g. ext4 with 1 KiB blocks).  Previously, the test would
write over 2 KiB, making it fail with ENOSPC on such systems.
(cherry picked from commit 2c0a21c)

Co-authored-by: Michał Górny <[email protected]>
ebonnal pushed a commit to ebonnal/cpython that referenced this pull request Jan 12, 2025
…python#126930)

Modify the extended attribute tests to write fewer and smaller extended
attributes, in order to fit within filesystems with total xattr limit
of 1 KiB (e.g. ext4 with 1 KiB blocks).  Previously, the test would
write over 2 KiB, making it fail with ENOSPC on such systems.
gentoo-bot pushed a commit to gentoo/cpython that referenced this pull request Apr 9, 2025
… limits (pythonGH-126930) (python#126964)

pythongh-126909: Fix running xattr tests on systems with lower limits (pythonGH-126930)

Modify the extended attribute tests to write fewer and smaller extended
attributes, in order to fit within filesystems with total xattr limit
of 1 KiB (e.g. ext4 with 1 KiB blocks).  Previously, the test would
write over 2 KiB, making it fail with ENOSPC on such systems.
(cherry picked from commit 2c0a21c)

Co-authored-by: Michał Górny <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants