Linux RTC
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: linux-rtc@vger.kernel.org
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Shuah Khan <shuah@kernel.org>,
	linux-kselftest@vger.kernel.org
Subject: [PATCH 1/3] selftest: rtc: rtctest: don't mention skipping twice
Date: Wed, 16 Sep 2026 23:31:09 +0200	[thread overview]
Message-ID: <20260916213108.9234-6-wsa+renesas@sang-engineering.com> (raw)
In-Reply-To: <20260916213108.9234-5-wsa+renesas@sang-engineering.com>

The framework already annotates that we are skipping something. No need
to do in the tests themselves again.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 tools/testing/selftests/rtc/rtctest.c | 31 +++++++++++++--------------
 1 file changed, 15 insertions(+), 16 deletions(-)

diff --git a/tools/testing/selftests/rtc/rtctest.c b/tools/testing/selftests/rtc/rtctest.c
index 8047d9879039..077cdc2c6f87 100644
--- a/tools/testing/selftests/rtc/rtctest.c
+++ b/tools/testing/selftests/rtc/rtctest.c
@@ -49,7 +49,7 @@ TEST_F(rtc, date_read) {
 	struct rtc_time rtc_tm;
 
 	if (self->fd == -1 && errno == ENOENT)
-		SKIP(return, "Skipping test since %s does not exist", rtc_file);
+		SKIP(return, "%s does not exist", rtc_file);
 	ASSERT_NE(-1, self->fd);
 
 	/* Read the RTC time/date */
@@ -118,7 +118,7 @@ TEST_F_TIMEOUT(rtc, date_read_loop, READ_LOOP_DURATION_SEC + 2) {
 	time_t start_rtc_read, prev_rtc_read;
 
 	if (self->fd == -1 && errno == ENOENT)
-		SKIP(return, "Skipping test since %s does not exist", rtc_file);
+		SKIP(return, "%s does not exist", rtc_file);
 	ASSERT_NE(-1, self->fd);
 
 	TH_LOG("Continuously reading RTC time for %ds (with %dms breaks after every read).",
@@ -156,7 +156,7 @@ TEST_F_TIMEOUT(rtc, uie_read, NUM_UIE + 2) {
 	unsigned long data;
 
 	if (self->fd == -1 && errno == ENOENT)
-		SKIP(return, "Skipping test since %s does not exist", rtc_file);
+		SKIP(return, "%s does not exist", rtc_file);
 	ASSERT_NE(-1, self->fd);
 
 	/* Turn on update interrupts */
@@ -185,7 +185,7 @@ TEST_F(rtc, uie_select) {
 	unsigned long data;
 
 	if (self->fd == -1 && errno == ENOENT)
-		SKIP(return, "Skipping test since %s does not exist", rtc_file);
+		SKIP(return, "%s does not exist", rtc_file);
 	ASSERT_NE(-1, self->fd);
 
 	/* Turn on update interrupts */
@@ -229,14 +229,14 @@ TEST_F(rtc, alarm_alm_set) {
 	enum rtc_alarm_state alarm_state = RTC_ALARM_UNKNOWN;
 
 	if (self->fd == -1 && errno == ENOENT)
-		SKIP(return, "Skipping test since %s does not exist", rtc_file);
+		SKIP(return, "%s does not exist", rtc_file);
 	ASSERT_NE(-1, self->fd);
 
 	alarm_state = get_rtc_alarm_state(self->fd, 1);
 	if (alarm_state == RTC_ALARM_DISABLED)
-		SKIP(return, "Skipping test since alarms are not supported.");
+		SKIP(return, "alarms are not supported.");
 	if (alarm_state == RTC_ALARM_RES_MINUTE)
-		SKIP(return, "Skipping test since alarms has only minute granularity.");
+		SKIP(return, "alarms has only minute granularity.");
 
 	rc = ioctl(self->fd, RTC_RD_TIME, &tm);
 	ASSERT_NE(-1, rc);
@@ -299,14 +299,14 @@ TEST_F(rtc, alarm_wkalm_set) {
 	enum rtc_alarm_state alarm_state = RTC_ALARM_UNKNOWN;
 
 	if (self->fd == -1 && errno == ENOENT)
-		SKIP(return, "Skipping test since %s does not exist", rtc_file);
+		SKIP(return, "%s does not exist", rtc_file);
 	ASSERT_NE(-1, self->fd);
 
 	alarm_state = get_rtc_alarm_state(self->fd, 1);
 	if (alarm_state == RTC_ALARM_DISABLED)
-		SKIP(return, "Skipping test since alarms are not supported.");
+		SKIP(return, "alarms are not supported.");
 	if (alarm_state == RTC_ALARM_RES_MINUTE)
-		SKIP(return, "Skipping test since alarms has only minute granularity.");
+		SKIP(return, "alarms has only minute granularity.");
 
 	rc = ioctl(self->fd, RTC_RD_TIME, &alarm.time);
 	ASSERT_NE(-1, rc);
@@ -363,12 +363,12 @@ TEST_F_TIMEOUT(rtc, alarm_alm_set_minute, 65) {
 	enum rtc_alarm_state alarm_state = RTC_ALARM_UNKNOWN;
 
 	if (self->fd == -1 && errno == ENOENT)
-		SKIP(return, "Skipping test since %s does not exist", rtc_file);
+		SKIP(return, "%s does not exist", rtc_file);
 	ASSERT_NE(-1, self->fd);
 
 	alarm_state = get_rtc_alarm_state(self->fd, 0);
 	if (alarm_state == RTC_ALARM_DISABLED)
-		SKIP(return, "Skipping test since alarms are not supported.");
+		SKIP(return, "alarms are not supported.");
 
 	rc = ioctl(self->fd, RTC_RD_TIME, &tm);
 	ASSERT_NE(-1, rc);
@@ -431,12 +431,12 @@ TEST_F_TIMEOUT(rtc, alarm_wkalm_set_minute, 65) {
 	enum rtc_alarm_state alarm_state = RTC_ALARM_UNKNOWN;
 
 	if (self->fd == -1 && errno == ENOENT)
-		SKIP(return, "Skipping test since %s does not exist", rtc_file);
+		SKIP(return, "%s does not exist", rtc_file);
 	ASSERT_NE(-1, self->fd);
 
 	alarm_state = get_rtc_alarm_state(self->fd, 0);
 	if (alarm_state == RTC_ALARM_DISABLED)
-		SKIP(return, "Skipping test since alarms are not supported.");
+		SKIP(return, "alarms are not supported.");
 
 	rc = ioctl(self->fd, RTC_RD_TIME, &alarm.time);
 	ASSERT_NE(-1, rc);
@@ -502,8 +502,7 @@ int main(int argc, char **argv)
 	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);
+		ksft_exit_skip("Cannot access rtc file %s - Exiting\n", rtc_file);
 
 	return ret;
 }
-- 
2.53.0


  reply	other threads:[~2026-09-16 21:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-16 21:31 [PATCH 0/3] selftest: rtc: rtctest: improve handling of skipped tests Wolfram Sang
2026-09-16 21:31 ` Wolfram Sang [this message]
2026-09-16 21:38   ` [PATCH 1/3] selftest: rtc: rtctest: don't mention skipping twice sashiko-bot
2026-09-16 21:31 ` [PATCH 2/3] selftest: rtc: rtctest: make missing UIEs really skip Wolfram Sang
2026-09-16 21:39   ` sashiko-bot
2026-09-16 21:31 ` [RFC PATCH 3/3] selftest: rtc: rtctest: skip properly if setting alarm fails Wolfram Sang
2026-09-16 21:35   ` sashiko-bot
2026-10-08 19:48 ` [PATCH 0/3] selftest: rtc: rtctest: improve handling of skipped tests Wolfram Sang
2026-10-08 22:19   ` Alexandre Belloni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260916213108.9234-6-wsa+renesas@sang-engineering.com \
    --to=wsa+renesas@sang-engineering.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox