Use the proper framework call to mark a test as skipped. Currently, the test is considered good, only the printout mentions the skip.
Signed-off-by: Wolfram Sang <[email protected]> --- Maybe I am reading the logic wrong. But, the SKIPs I add here are hit when setting an alarm fails. I wonder if this is really a SKIP and not an error? We have already checked above if alarms are supported using a designated check (and then skip), or? tools/testing/selftests/rtc/rtctest.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/tools/testing/selftests/rtc/rtctest.c b/tools/testing/selftests/rtc/rtctest.c index 962050a32985..46fbaef9fdeb 100644 --- a/tools/testing/selftests/rtc/rtctest.c +++ b/tools/testing/selftests/rtc/rtctest.c @@ -250,8 +250,7 @@ TEST_F(rtc, alarm_alm_set) { */ ASSERT_EQ(RTC_ALARM_UNKNOWN, alarm_state); ASSERT_EQ(EINVAL, errno); - TH_LOG("skip alarms are not supported."); - return; + SKIP(return, "alarms are not supported."); } rc = ioctl(self->fd, RTC_ALM_READ, &tm); @@ -322,8 +321,7 @@ TEST_F(rtc, alarm_wkalm_set) { */ ASSERT_EQ(RTC_ALARM_UNKNOWN, alarm_state); ASSERT_EQ(EINVAL, errno); - TH_LOG("skip alarms are not supported."); - return; + SKIP(return, "alarms are not supported."); } rc = ioctl(self->fd, RTC_WKALM_RD, &alarm); @@ -382,8 +380,7 @@ TEST_F_TIMEOUT(rtc, alarm_alm_set_minute, 65) { */ ASSERT_EQ(RTC_ALARM_UNKNOWN, alarm_state); ASSERT_EQ(EINVAL, errno); - TH_LOG("skip alarms are not supported."); - return; + SKIP(return, "alarms are not supported."); } rc = ioctl(self->fd, RTC_ALM_READ, &tm); @@ -452,8 +449,7 @@ TEST_F_TIMEOUT(rtc, alarm_wkalm_set_minute, 65) { */ ASSERT_EQ(RTC_ALARM_UNKNOWN, alarm_state); ASSERT_EQ(EINVAL, errno); - TH_LOG("skip alarms are not supported."); - return; + SKIP(return, "alarms are not supported."); } rc = ioctl(self->fd, RTC_WKALM_RD, &alarm); -- 2.53.0
