From: Pavel Reichl <preichl@redhat.com>
To: fstests@vger.kernel.org
Cc: shreeya.patel@collabora.com
Subject: [PATCH] generic/192: Fix instability on exFAT
Date: Tue, 27 Apr 2021 10:59:29 +0200 [thread overview]
Message-ID: <20210427085929.381183-1-preichl@redhat.com> (raw)
exFAT's access time has 2s granularity and is rounded down.
This can cause problems, e.g.:
if real access times are: time1=2 and time2=7, then 7 - 2 = 5;
but exfat_atime(7) - exfat_atime(2) => 6 - 2 = 4 which is less
than expected delay.
To fix this, even (delay - 1s) should be considered as a valid result
for exFAT.
Signed-off-by: Pavel Reichl <preichl@redhat.com>
---
tests/generic/192 | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tests/generic/192 b/tests/generic/192
index 900e2cb5..2bc8835f 100755
--- a/tests/generic/192
+++ b/tests/generic/192
@@ -52,8 +52,13 @@ time3=`_access_time $testfile | tee -a $seqres.full`
delta1=`expr $time2 - $time1`
delta2=`expr $time3 - $time1`
+min_tol=0
+if [ "$FSTYP" = "exfat" ]; then
+ min_tol=1
+fi
+
# tolerate an atime up to 2s later than the ideal case
-_within_tolerance "delta1" $delta1 $delay 0 2 -v
+_within_tolerance "delta1" $delta1 $delay $min_tol 2 -v
_within_tolerance "delta2" $delta2 $delta1 0 0 -v
# success, all done
--
2.30.2
reply other threads:[~2021-04-27 8:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210427085929.381183-1-preichl@redhat.com \
--to=preichl@redhat.com \
--cc=fstests@vger.kernel.org \
--cc=shreeya.patel@collabora.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox