From: Gianfranco Trad <gianf.trad@gmail.com>
To: jstultz@google.com, tglx@linutronix.de, sboyd@kernel.org,
anna-maria@linutronix.de, frederic@kernel.org, shuah@kernel.org
Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
Gianfranco Trad <gianf.trad@gmail.com>
Subject: [PATCH] selftests: timers: improve timer_create failure message
Date: Thu, 29 Aug 2024 17:37:25 +0200 [thread overview]
Message-ID: <20240829153725.4437-1-gianf.trad@gmail.com> (raw)
In-Reply-To: <877cbz9x8t.ffs@tglx>
improve timer_create failure message with strerror() function
to give more information to the user.
Signed-off-by: Gianfranco Trad <gianf.trad@gmail.com>
---
tools/testing/selftests/timers/alarmtimer-suspend.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/timers/alarmtimer-suspend.c b/tools/testing/selftests/timers/alarmtimer-suspend.c
index ad52e608b88e..74acdb87d4f4 100644
--- a/tools/testing/selftests/timers/alarmtimer-suspend.c
+++ b/tools/testing/selftests/timers/alarmtimer-suspend.c
@@ -28,6 +28,7 @@
#include <signal.h>
#include <stdlib.h>
#include <pthread.h>
+#include <errno.h>
#include "../kselftest.h"
#define CLOCK_REALTIME 0
@@ -142,8 +143,8 @@ int main(void)
alarmcount = 0;
if (timer_create(alarm_clock_id, &se, &tm1) == -1) {
- printf("timer_create failed, %s unsupported?\n",
- clockstring(alarm_clock_id));
+ printf("timer_create failed, %s unsupported?: %s\n",
+ clockstring(alarm_clock_id), strerror(errno));
break;
}
--
2.43.0
next prev parent reply other threads:[~2024-08-29 15:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-29 14:25 [PATCH] Improve timer_create failure message Gianfranco Trad
2024-08-29 15:14 ` Thomas Gleixner
2024-08-29 15:37 ` Gianfranco Trad [this message]
2024-09-30 18:49 ` [PATCH] selftests: timers: improve " Shuah Khan
2024-09-30 19:19 ` John Stultz
2024-09-30 19:53 ` Shuah Khan
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=20240829153725.4437-1-gianf.trad@gmail.com \
--to=gianf.trad@gmail.com \
--cc=anna-maria@linutronix.de \
--cc=frederic@kernel.org \
--cc=jstultz@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=sboyd@kernel.org \
--cc=shuah@kernel.org \
--cc=tglx@linutronix.de \
/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