Skip to content

Commit 6b1f730

Browse files
committed
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 <rodrigoca@microsoft.com>
1 parent 5052c07 commit 6b1f730

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/integration/mounts_sshfs.bats

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function setup_sshfs() {
4343
fi
4444
# Reset atime flags. "diratime" is quite a strange flag, so we need to make
4545
# sure it's cleared before we apply the requested flags.
46-
mount --bind -o remount,diratime,strictatime "$DIR"
46+
mount --bind -o remount,diratime,atime,strictatime "$DIR"
4747
# We need to set the mount flags separately on the mount because some mount
4848
# flags (such as "ro") are set on the superblock if you do them in the
4949
# initial mount, which means that they cannot be cleared by bind-mounts.

0 commit comments

Comments
 (0)