From: Gianfranco Trad Date: Thu, 29 Aug 2024 15:37:25 +0000 (+0200) Subject: selftests: timers: improve timer_create failure message X-Git-Tag: v6.13-rc1~161^2~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d70d4218339e657e80ea478e43ec327cf374826b;p=thirdparty%2Fkernel%2Flinux.git selftests: timers: improve timer_create failure message improve timer_create failure message with strerror() function to give more information to the user. Signed-off-by: Gianfranco Trad Acked-by: John Stultz Signed-off-by: Shuah Khan --- diff --git a/tools/testing/selftests/timers/alarmtimer-suspend.c b/tools/testing/selftests/timers/alarmtimer-suspend.c index 62da2a3f949ec..9877158a08531 100644 --- a/tools/testing/selftests/timers/alarmtimer-suspend.c +++ b/tools/testing/selftests/timers/alarmtimer-suspend.c @@ -29,6 +29,7 @@ #include #include #include +#include #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; }