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

Commits on Apr 9, 2024

  1. tests/integration/mounts_sshfs.bats: Fix test on debian testing

    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 committed Apr 9, 2024
    Configuration menu
    Copy the full SHA
    5052c07 View commit details
    Browse the repository at this point in the history
  2. tests/integration: Fix remount on debian testing

    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 committed Apr 9, 2024
    Configuration menu
    Copy the full SHA
    6b1f730 View commit details
    Browse the repository at this point in the history