Skip to content

Commit

Permalink
utimensat_tests.sh: returns EPERM above 4.4.27 and below 4.5.0
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Naresh Kamboju authored and jstancek committed Sep 29, 2017
1 parent 91400c3 commit 72d1c8c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion testcases/kernel/syscalls/utimensat/utimensat_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ 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
elif tst_kvcmp -lt "4.4.27"; then
imaccess=EACCES
else
imaccess=EPERM
Expand Down

0 comments on commit 72d1c8c

Please sign in to comment.