public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Improve timer_create failure message
@ 2024-08-29 14:25 Gianfranco Trad
  2024-08-29 15:14 ` Thomas Gleixner
  0 siblings, 1 reply; 6+ messages in thread
From: Gianfranco Trad @ 2024-08-29 14:25 UTC (permalink / raw)
  To: jstultz, tglx, sboyd, anna-maria, frederic, shuah
  Cc: linux-kernel, linux-kselftest, Gianfranco Trad

Improve timer_create failure message 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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-09-30 19:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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   ` [PATCH] selftests: timers: improve " Gianfranco Trad
2024-09-30 18:49     ` Shuah Khan
2024-09-30 19:19       ` John Stultz
2024-09-30 19:53         ` Shuah Khan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox