[LTP] [PATCHv2 0/2] Fix for syscalls/utimensat01 test on Ubuntu 4.4 kernel

Po-Hsu Lin
2020-08-18T10:04:20Z

Ubuntu 4.4 kernel got the backported kernel patch (b3b4283) for
syscalls/utimensat01 since 4.4.0-48.69, therefore it will return
EPERM instead of EACCES.

Without this fix, the test will fail on Ubuntu 4.4 kernel with:
FAIL: 18: utimensat() failed with incorrect error, expected EACCES: EPERM (1)
FAIL: 19: utimensat() failed with incorrect error, expected EACCES: EPERM (1)

Add Ubuntu kernel version comparison to fix this.

Also add support to get the distname for different OS by parsing ID=
from /etc/os-release in tst_kvcmp_distname()

Po-Hsu Lin (2):
lib/tst_kvercmp: Add support to get distname for different OS in
tst_kvcmp_distname
syscalls/utimensat01: add exception for Ubuntu 4.4 kernel

lib/tst_kvercmp.c | 16 ++++++++++++++++
.../kernel/syscalls/utimensat/utimensat01.c | 7 ++++++-
2 files changed, 22 insertions(+), 1 deletion(-)

--
2.25.1