[LTP] [PATCH] utimensat_tests.sh: returns EPERM on 4.4.27 and above
Jan Stancek
jstancek@redhat.com
Wed Sep 27 15:55:13 CEST 2017
----- Original Message -----
> Hi!
> > I'd think so too - perhaps a better check is to check for (if 4.4.X,
> > then if > .27) OR (greater than 4.8.0)?
>
> The safest bet would be allowing both for kernels between 4.4 and 4.8.
But also less strict. Why not just add check for 3rd digit?
We already do that in other tests.
diff --git a/testcases/kernel/syscalls/utimensat/utimensat_tests.sh b/testcases/kernel/syscalls/utimensat/utimensat_tests.sh
index 48154d6e65b2..6d7fc5030aff 100755
--- a/testcases/kernel/syscalls/utimensat/utimensat_tests.sh
+++ b/testcases/kernel/syscalls/utimensat/utimensat_tests.sh
@@ -32,13 +32,16 @@ fi
# Starting with 4.8.0 operations on immutable files return EPERM instead of
# EACCES.
-if tst_kvcmp -lt "4.8.0"; then
+# This patch has also been merged to stable 4.4 with
+# b3b4283 ("vfs: move permission checking into notify_change() for utimes(NULL)")
+if tst_kvcmp -ge "4.4.27" -a -lt "4.5.0"; then
+ imaccess=EPERM
+else if tst_kvcmp -lt "4.8.0"; then
imaccess=EACCES
else
imaccess=EPERM
fi
Regards,
Jan
More information about the ltp
mailing list