All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] tst_test.h: fix tst_test->tid for unsupported cases
Date: Wed, 17 Aug 2016 11:22:11 +0200	[thread overview]
Message-ID: <20160817092211.GC5817@rei.lan> (raw)
In-Reply-To: <1471425396-26898-1-git-send-email-yangx.jy@cn.fujitsu.com>

Hi!
> If some cases aren't supported by system, they fail with
> the following message:
>   "tst_test.c:569: BROK: No tid set in test structure"
> We should return TCONF instead of TBROK.

My bad, I've broke it with the assert for non-null tid.

> Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
> ---
>  include/tst_test.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/tst_test.h b/include/tst_test.h
> index 7e4997f..03722ec 100644
> --- a/include/tst_test.h
> +++ b/include/tst_test.h
> @@ -160,8 +160,8 @@ int main(int argc, char *argv[])
>  
>  #define TST_TEST_TCONF(message)                                           \
>  	static void tst_do_test(void) { tst_brk(TCONF, "%s", message); }; \
> -        static struct tst_test test = { .test_all = tst_do_test }         \
> -
> +	static struct tst_test test = { .test_all = tst_do_test,          \
> +					.tid = "tst_test_conf" }          \

I guess that a little better solution would be to pass the test id to
the TST_TEST_TCONF() macro as well. I will fix that.

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2016-08-17  9:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-17  9:16 [LTP] [PATCH] tst_test.h: fix tst_test->tid for unsupported cases Xiao Yang
2016-08-17  9:22 ` Cyril Hrubis [this message]
2016-08-17  9:29   ` Cyril Hrubis
2016-08-17  9:37     ` Cyril Hrubis

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=20160817092211.GC5817@rei.lan \
    --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.