All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] API: Give user hint when checkpoints were not initialised
Date: Wed, 12 May 2021 14:28:39 +0200	[thread overview]
Message-ID: <YJvJ91pXVluuzpvu@yuki> (raw)
In-Reply-To: <20210512101738.31118-1-rpalethorpe@suse.com>

Hi!
> ---
>  lib/tst_checkpoint.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/tst_checkpoint.c b/lib/tst_checkpoint.c
> index 9e9dcf9e6..13d86c73b 100644
> --- a/lib/tst_checkpoint.c
> +++ b/lib/tst_checkpoint.c
> @@ -86,6 +86,9 @@ int tst_checkpoint_wait(unsigned int id, unsigned int msec_timeout)
>  	struct timespec timeout;
>  	int ret;
>  
> +	if (!tst_max_futexes)
> +		tst_brkm(TBROK, NULL, "Set test.needs_checkpoints = 1");
> +
>  	if (id >= tst_max_futexes) {
>  		errno = EOVERFLOW;
>  		return -1;
> @@ -107,7 +110,10 @@ int tst_checkpoint_wake(unsigned int id, unsigned int nr_wake,
>  {
>  	unsigned int msecs = 0, waked = 0;
>  
> -	if (id >= tst_max_futexes) {
> +	if (!tst_max_futexes)
> +		tst_brkm(TBROK, NULL, "Set test.needs_checkpoints = 1");
> +
> +        if (id >= tst_max_futexes) {
    ^
    Spaces instead of tabs...


Other than that this looks obviously fine.

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2021-05-12 12:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-12 10:17 [LTP] [PATCH] API: Give user hint when checkpoints were not initialised Richard Palethorpe
2021-05-12 12:28 ` Cyril Hrubis [this message]
2021-05-12 13:42 ` Petr Vorel
2021-05-12 13:58   ` Cyril Hrubis
2021-05-13  7:08     ` Richard Palethorpe

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=YJvJ91pXVluuzpvu@yuki \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.