All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xiao Yang <yangx.jy@cn.fujitsu.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v3 3/3] syscalls: Take use of TST_EXP_PASS_SILENT
Date: Thu, 21 Jan 2021 10:21:06 +0800	[thread overview]
Message-ID: <6008E512.50704@cn.fujitsu.com> (raw)
In-Reply-To: <YAgHUvIge6svN0gu@yuki.lan>

On 2021/1/20 18:34, Cyril Hrubis wrote:
> Hi!
>> diff --git a/testcases/kernel/syscalls/capget/capget01.c b/testcases/kernel/syscalls/capget/capget01.c
>> index 6c17a7c7c..af088e2fc 100644
>> --- a/testcases/kernel/syscalls/capget/capget01.c
>> +++ b/testcases/kernel/syscalls/capget/capget01.c
>> @@ -32,8 +32,10 @@ static void verify_capget(unsigned int n)
>>   	hdr->version = tc->version;
>>   	hdr->pid = pid;
>>
>> -	TST_EXP_PASS(tst_syscall(__NR_capget, hdr, data),
>> +	TST_EXP_PASS_SILENT(tst_syscall(__NR_capget, hdr, data),
>>   	             "capget() with %s", tc->message);
>> +	if (!TST_PASS)
>> +		return;
>>
>>   	if (data[0].effective&  1<<  CAP_NET_RAW)
>>   		tst_res(TFAIL, "capget() gets CAP_NET_RAW unexpectedly in pE");
> I do not agree with the change in the capget01 here since there are
> really two testcases there and the test was producing the same amount of
> TPASS messages before the change to the TST_EXP_PASS() as well.
Hi Cyril,

Running  capget01 with TST_EXP_PASS() shows:
--------------------------------------------------------
capget01.c:35: TPASS: capget() with LINUX_CAPABILITY_VERSION_1 passed
capget01.c:41: TPASS: capget() doesn't get CAP_NET_RAW as expected in PE
capget01.c:35: TPASS: capget() with LINUX_CAPABILITY_VERSION_2 passed
capget01.c:41: TPASS: capget() doesn't get CAP_NET_RAW as expected in PE
capget01.c:35: TPASS: capget() with LINUX_CAPABILITY_VERSION_3 passed
capget01.c:41: TPASS: capget() doesn't get CAP_NET_RAW as expected in PE

Summary:
passed   6
--------------------------------------------------------

Running  capget01 with TST_EXP_PASS_SILENT() shows:
--------------------------------------------------------
capget01.c:43: TPASS: capget() doesn't get CAP_NET_RAW as expected in PE
capget01.c:43: TPASS: capget() doesn't get CAP_NET_RAW as expected in PE
capget01.c:43: TPASS: capget() doesn't get CAP_NET_RAW as expected in PE

Summary:
passed   3
--------------------------------------------------------

If you want to keep two TPASS for a subtest, how about merging two TPASS 
into one? like this:
------------------------------------------------------------------------------------------
capget01.c:43: TPASS: capget() with LINUX_CAPABILITY_VERSION_1 doesn't 
get CAP_NET_RAW as expected in PE
capget01.c:43: TPASS: capget() with LINUX_CAPABILITY_VERSION_2 doesn't 
get CAP_NET_RAW as expected in PE
capget01.c:43: TPASS: capget() with LINUX_CAPABILITY_VERSION_3 doesn't 
get CAP_NET_RAW as expected in PE

Summary:
passed   3
------------------------------------------------------------------------------------------ 

BTW, I just want to avoid many TPASS for a subtest.

Best Regards,
Xiao Yang
> Other than that the patchset is fine.
>
> So with the capget change removed you can add my:
>
> Reviewed-by: Cyril Hrubis<chrubis@suse.cz>
>




  reply	other threads:[~2021-01-21  2:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-12  2:02 [LTP] [PATCH v3 1/3] include/tst_test_macros.h: Add TST_EXP_{PASS, FD}_SILENT macros Xiao Yang
2021-01-12  2:02 ` [LTP] [PATCH v3 2/3] syscalls/open01.c: Take use of TST_EXP_FD_SILENT Xiao Yang
2021-01-12  2:02 ` [LTP] [PATCH v3 3/3] syscalls: Take use of TST_EXP_PASS_SILENT Xiao Yang
2021-01-20 10:34   ` Cyril Hrubis
2021-01-21  2:21     ` Xiao Yang [this message]
2021-01-22 13:47       ` Cyril Hrubis
2021-01-25  3:44         ` Xiao Yang
2021-01-20  9:51 ` [LTP] [PATCH v3 1/3] include/tst_test_macros.h: Add TST_EXP_{PASS, FD}_SILENT macros Xiao Yang

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=6008E512.50704@cn.fujitsu.com \
    --to=yangx.jy@cn.fujitsu.com \
    --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.