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

Fix tests in debian testing (mount_sshfs.bats) - minimal fix #4245

Conversation

rata
Copy link
Member

@rata rata commented Apr 8, 2024

This is another way to fix the tests in debian testing. It's an alternative for #4242.

I think #4242 is a more reliable fix (besides it's number full of wisdom and the meaning of life :-D), but this also does the trick in case you prefer a smaller fix.

Fixes #4093

@rata rata changed the title Fix tests debian testing (mount_sshfs.bats) - minimal fix Fix tests in debian testing (mount_sshfs.bats) - minimal fix Apr 8, 2024
relatime is not shown on some debian systems. Let's check that no other
setting that removes the relatime effect is set, as that should be
enough too.

For more info, see the issue linked in the comments.

Signed-off-by: Rodrigo Campos <[email protected]>
@rata rata force-pushed the rata/fix-tests-debian-testing-minimal-fix branch from 8921b64 to e090b85 Compare April 9, 2024 10:50
When we run this:

	mount --bind -o remount,diratime,strictatime "$DIR"

It fails in debian testing, when it is the second time we call this
function in the same bats test (i.e. when $DIR is defined already).

strace shows this syscall failing:

	mount_setattr(3, "", AT_EMPTY_PATH, {attr_set=MOUNT_ATTR_NOSUID|MOUNT_ATTR_NODEV|MOUNT_ATTR_NOEXEC|MOUNT_ATTR_NOATIME|MOUNT_ATTR_STRICTATIME, attr_clr=MOUNT_ATTR_RDONLY|MOUNT_ATTR_NOATIME|MOUNT_ATTR_STRICTATIME|MOUNT_ATTR_NODIRATIME|0x40, propagation=0 /* MS_??? */, userns_fd=0}, 32) = -1 EINVAL (Invalid argument)

Note it has `MOUNT_ATTR_NOATIME` and `MOUNT_ATTR_STRICTATIME` which
probably causes it to return EINVAL.

This patch simply adds atime to the options, so the mount command now
works and fixes most of the tests in debian testing.

Signed-off-by: Rodrigo Campos <[email protected]>
@rata rata force-pushed the rata/fix-tests-debian-testing-minimal-fix branch from e090b85 to 6b1f730 Compare April 9, 2024 12:17
Copy link
Contributor

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

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

LGTM

@kolyshkin kolyshkin merged commit c42ba59 into opencontainers:main Apr 10, 2024
38 checks passed
@rata rata deleted the rata/fix-tests-debian-testing-minimal-fix branch April 10, 2024 10:07
@lifubang lifubang mentioned this pull request Jun 10, 2024
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.

Tests broken in debian due to PR: rootfs: remove --no-mount-fallback and finally fix MS_REMOUNT
3 participants