Skip to content

Commit

Permalink
Merge pull request #4245 from kinvolk/rata/fix-tests-debian-testing-m…
Browse files Browse the repository at this point in the history
…inimal-fix

Fix tests in debian testing (mount_sshfs.bats) - minimal fix
  • Loading branch information
kolyshkin authored Apr 10, 2024
2 parents 5e0ec3f + 6b1f730 commit c42ba59
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/integration/mounts_sshfs.bats
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function setup_sshfs() {
fi
# Reset atime flags. "diratime" is quite a strange flag, so we need to make
# sure it's cleared before we apply the requested flags.
mount --bind -o remount,diratime,strictatime "$DIR"
mount --bind -o remount,diratime,atime,strictatime "$DIR"
# We need to set the mount flags separately on the mount because some mount
# flags (such as "ro") are set on the superblock if you do them in the
# initial mount, which means that they cannot be cleared by bind-mounts.
Expand Down Expand Up @@ -393,7 +393,11 @@ function fail_sshfs_bind_flags() {
pass_sshfs_bind_flags "nodiratime" "bind"
run -0 grep -wq nodiratime <<<"$mnt_flags"
# MS_DIRATIME implies MS_RELATIME by default.
run -0 grep -wq relatime <<<"$mnt_flags"
# Let's check either relatime is set or no other option that removes
# relatime semantics is set.
# The latter case is needed in debian. For more info, see issue: #4093
run -0 grep -wq relatime <<<"$mnt_flags" ||
(run ! grep -wqE 'strictatime|norelatime|noatime' <<<"$mnt_flags")

pass_sshfs_bind_flags "noatime,nodiratime" "bind"
run -0 grep -wq noatime <<<"$mnt_flags"
Expand Down

0 comments on commit c42ba59

Please sign in to comment.