From 5052c075109870dfb2f240caadc49a0318ff1fc3 Mon Sep 17 00:00:00 2001 From: Rodrigo Campos Date: Wed, 3 Apr 2024 15:09:49 +0100 Subject: [PATCH] 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 --- tests/integration/mounts_sshfs.bats | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/integration/mounts_sshfs.bats b/tests/integration/mounts_sshfs.bats index 0bef01784..10a2c19b2 100644 --- a/tests/integration/mounts_sshfs.bats +++ b/tests/integration/mounts_sshfs.bats @@ -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"