summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/rtc/rtctest.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-10-14 08:03:44 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-10-14 08:03:44 +0200
commit64f3b5a6bc49adf77d58eddd72a4bfccd492fa24 (patch)
treecdd6aa7a0d21482ae4d1e76d837f3712c8c6481d /tools/testing/selftests/rtc/rtctest.c
parentUSB: chaoskey: Fix possible deadlock chaoskey_list_lock (diff)
parentLinux 6.12-rc3 (diff)
downloadlinux-64f3b5a6bc49adf77d58eddd72a4bfccd492fa24.tar.xz
linux-64f3b5a6bc49adf77d58eddd72a4bfccd492fa24.zip
Merge 6.12-rc3 into usb-next
We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/rtc/rtctest.c')
-rw-r--r--tools/testing/selftests/rtc/rtctest.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/testing/selftests/rtc/rtctest.c b/tools/testing/selftests/rtc/rtctest.c
index 9647b14b47c5..38a8e67de77d 100644
--- a/tools/testing/selftests/rtc/rtctest.c
+++ b/tools/testing/selftests/rtc/rtctest.c
@@ -412,6 +412,8 @@ TEST_F_TIMEOUT(rtc, alarm_wkalm_set_minute, 65) {
int main(int argc, char **argv)
{
+ int ret = -1;
+
switch (argc) {
case 2:
rtc_file = argv[1];
@@ -423,5 +425,12 @@ int main(int argc, char **argv)
return 1;
}
- return test_harness_run(argc, argv);
+ /* Run the test if rtc_file is accessible */
+ if (access(rtc_file, R_OK) == 0)
+ ret = test_harness_run(argc, argv);
+ else
+ ksft_exit_skip("[SKIP]: Cannot access rtc file %s - Exiting\n",
+ rtc_file);
+
+ return ret;
}