]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
selftests: timers: rtcpie: skip test if default RTC device does not exist
authorPo-Hsu Lin <po-hsu.lin@canonical.com>
Mon, 26 Jul 2021 07:56:08 +0000 (15:56 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 13 Aug 2021 07:31:53 +0000 (09:31 +0200)
commit30ed65344ff10357cf003af0ae1ff1e40b5d8f2e
tree2e10eecbb240bece7923a0c1cf94d8c2851e652a
parent7760ba22027ae9ab7fe25af73a954fd797323533
selftests: timers: rtcpie: skip test if default RTC device does not exist

BugLink: https://bugs.launchpad.net/bugs/1937991
This test will require /dev/rtc0, the default RTC device, or one
specified by user to run. Since this default RTC is not guaranteed to
exist on all of the devices, so check its existence first, otherwise
skip this test with the kselftest skip code 4.

Without this patch this test will fail like this on a s390x zVM:
$ selftests: timers: rtcpie
$ /dev/rtc0: No such file or directory
not ok 1 selftests: timers: rtcpie # exit=22

With this patch:
$ selftests: timers: rtcpie
$ Default RTC /dev/rtc0 does not exist. Test Skipped!
not ok 9 selftests: timers: rtcpie # SKIP

Fixed up change log so "With this patch" text doesn't get dropped.
Shuah Khan <skhan@linuxfoundation.org>

Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
(cherry picked from commit 0d3e5a057992bdc66e4dca2ca50b77fa4a7bd90e)
Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
tools/testing/selftests/timers/rtcpie.c