Skip to content

Commit 72d1c8c

Browse files
Naresh Kambojujstancek
authored andcommitted
utimensat_tests.sh: returns EPERM above 4.4.27 and below 4.5.0
Test utimensat failed on 4.4 is due to expected error is EACCES but got EPERM. With the reference to backported patch changing the test code to set error code EPERM when kernel version is above 4.4.27 and below 4.5.0 The patch backported on 4.4 details tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git branch: v4.4.27 commit id: b3b4283 vfs: move permission checking into notify_change() for utimes(NULL) Bug reported on this case, LKFT: linux-stable-4.4: LTP utimensat01 failed-EXPECTED: EACCES but got EPERM https://bugs.linaro.org/show_bug.cgi?id=3142 Signed-off-by: Naresh Kamboju <[email protected]> Reviewed-by: Sumit Semwal <[email protected]> Acked-by: Jan Stancek <[email protected]>
1 parent 91400c3 commit 72d1c8c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

testcases/kernel/syscalls/utimensat/utimensat_tests.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ fi
3232

3333
# Starting with 4.8.0 operations on immutable files return EPERM instead of
3434
# EACCES.
35-
if tst_kvcmp -lt "4.8.0"; then
35+
# This patch has also been merged to stable 4.4 with
36+
# b3b4283 ("vfs: move permission checking into notify_change() for utimes(NULL)")
37+
if tst_kvcmp -ge "4.4.27" -a -lt "4.5.0"; then
38+
imaccess=EPERM
39+
elif tst_kvcmp -lt "4.4.27"; then
3640
imaccess=EACCES
3741
else
3842
imaccess=EPERM

0 commit comments

Comments
 (0)