Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Shuah Khan <skhan@linuxfoundation.org>
To: Gianfranco Trad <gianf.trad@gmail.com>,
	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,
	Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH] selftests: timers: improve timer_create failure message
Date: Mon, 30 Sep 2024 12:49:44 -0600	[thread overview]
Message-ID: <54d1bcb6-b817-4ab5-be0e-aea34cfe0d5f@linuxfoundation.org> (raw)
In-Reply-To: <20240829153725.4437-1-gianf.trad@gmail.com>

On 8/29/24 09:37, Gianfranco Trad wrote:
> 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;
>   		}
>   

Jon, Does this look good to you? I can pick this up if you
okay with this change.

thanks,
-- Shuah



  reply	other threads:[~2024-09-30 18:49 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   ` [PATCH] selftests: timers: improve " Gianfranco Trad
2024-09-30 18:49     ` Shuah Khan [this message]
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=54d1bcb6-b817-4ab5-be0e-aea34cfe0d5f@linuxfoundation.org \
    --to=skhan@linuxfoundation.org \
    --cc=anna-maria@linutronix.de \
    --cc=frederic@kernel.org \
    --cc=gianf.trad@gmail.com \
    --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