Skip to content

tests: Avoid an undersized statfs buffer in tmpfs assertions - #834

Open
iamda-y wants to merge 1 commit into
containers:mainfrom
iamda-y:contrib/statfs-buffer-788
Open

iamda-y wants to merge 1 commit into
containers:mainfrom
iamda-y:contrib/statfs-buffer-788

Conversation

@iamda-y

@iamda-y iamda-y commented Nov 16, 2026 •

Copy link
Copy Markdown

This splits Domen Kožar's fix from #788 into a separate PR, following smcv's request.

The test helper previously passed an undersized ctypes buffer to statfs(), which writes the full native structure. The fix reads the filesystem type from /proc/self/mounts instead.

@ao2 ao2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The changes look good to me, I only have one comment.

Comment thread tests/test-sandbox.py Resolved
@iamda-y
iamda-y requested a review from ao2 November 16, 2026 19:11

@ao2 ao2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If @domenkozar agrees, let's squash the commits to have a cleaner history, and @iamda-y can add another Signed-off-by: or a Co-authored-by: tag to the commit message.

And I think we can also remove the note about (cherry picked from commit 6e558d4 ) from the commit message, when the original PR will be rebased after this gets merged that commit ID will become less relevant.

If your really want to add some reference you could mention the PR where this is taken from, but even that might not be strictly necessary.

Thanks, Antonio.

@domenkozar

Copy link
Copy Markdown

Sounds good to me!

Read the filesystem type from /proc/self/mounts instead of letting libc write a complete, architecture-dependent statfs structure into a two-field ctypes buffer.

Validation: all six Meson suites pass in Debian trixie with warnings as errors, SELinux, ASan, UBSan and PYTHONMALLOC=debug.

Signed-off-by: Domen Kožar <domen@cachix.org>
Signed-off-by: iamda-y <lambdaecorporation@gmail.com>
@iamda-y
iamda-y force-pushed the contrib/statfs-buffer-788 branch from a6aa4e6 to fb04d21 Compare November 17, 2026 10:20
@iamda-y

iamda-y commented Nov 17, 2026

Copy link
Copy Markdown
Author

Cleanup has been completed.

@iamda-y
iamda-y requested a review from ao2 November 17, 2026 10:24

@ao2 ao2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

FWIW, the change looks good to me.

@iamda-y

iamda-y commented Nov 18, 2026

Copy link
Copy Markdown
Author

The modified test-sandbox.py suite passed all 68 tests. Could the failed job be rerun?

@iamda-y
iamda-y requested a review from smcv November 18, 2026 22:08
@smcv

smcv commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

I don't know why the pipeline is failing, but it did seem to be genuinely failing. Sorry, I cannot currently allocate time to debug this.

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.

4 participants