All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v6 1/2] lib/tst_timer_test: move test setup function before PR_GET_TIMERSLACK
Date: Mon, 25 Nov 2019 18:18:02 +0800	[thread overview]
Message-ID: <95fbd060-cffb-db2a-65b0-da9f9a5d4213@cn.fujitsu.com> (raw)
In-Reply-To: <71e855bf-62c8-5ee1-e8d2-6753459571f7@cn.fujitsu.com>

Hi

ping.

> Hi Cyril
>  ?I think this patch can be merged if it is ok.
> Thanks
> Yang Xu
>> Move test setup function before PR_GET_TIMERSLACK in timer setup function so
>> that the library includes the newly set timerslack in the calculation.
>>
>> Signed-off-by: Yang Xu<xuyang2018.jy@cn.fujitsu.com>
>> Reviewed-by: Cyril Hrubis<chrubis@suse.cz>
>> ---
>>   lib/tst_timer_test.c | 8 +++-----
>>   1 file changed, 3 insertions(+), 5 deletions(-)
>>
>> diff --git a/lib/tst_timer_test.c b/lib/tst_timer_test.c
>> index f6459e5c0..13e9deff2 100644
>> --- a/lib/tst_timer_test.c
>> +++ b/lib/tst_timer_test.c
>> @@ -340,6 +340,9 @@ static void timer_setup(void)
>>   	struct timespec t;
>>   	int ret;
>>   
>> +	if (setup)
>> +		setup();
>> +
>>   	tst_clock_getres(CLOCK_MONOTONIC, &t);
>>   
>>   	tst_res(TINFO, "CLOCK_MONOTONIC resolution %lins", (long)t.tv_nsec);
>> @@ -360,16 +363,11 @@ static void timer_setup(void)
>>   	tst_res(TINFO, "PR_GET_TIMERSLACK not defined, using %uus",
>>   		timerslack);
>>   #endif /* PR_GET_TIMERSLACK */
>> -
>>   	parse_timer_opts();
>>   
>>   	samples = SAFE_MALLOC(sizeof(long long) * MAX(MAX_SAMPLES, sample_cnt));
>> -
>>   	if (set_latency() < 0)
>>   		tst_res(TINFO, "Failed to set zero latency constraint: %m");
>> -
>> -	if (setup)
>> -		setup();
>>   }
>>   
>>   static void timer_cleanup(void)
>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20191125/2bb2fafe/attachment.htm>

  reply	other threads:[~2019-11-25 10:18 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-09 10:51 [LTP] [PATCH v3] syscalls/prctl08: New test for prctl() with PR_{SET, GET}_TIMERSLACK Yang Xu
2019-10-09 12:19 ` Cyril Hrubis
2019-10-11  4:23   ` [LTP] [PATCH v4 1/2] " Yang Xu
2019-10-11  4:23     ` [LTP] [PATCH v4 2/2] syscalls/prctl09: New timer sample test for PR_SET_TIMERSLACK Yang Xu
2019-11-07 13:23       ` Cyril Hrubis
2019-11-08 11:21         ` Yang Xu
2019-10-21 13:00     ` [LTP] [PATCH v4 1/2] syscalls/prctl08: New test for prctl() with PR_{SET, GET}_TIMERSLACK Yang Xu
2019-11-07 13:05     ` Cyril Hrubis
2019-11-08 11:03       ` Yang Xu
2019-11-08 12:00       ` [LTP] [PATCH v5 " Yang Xu
2019-11-08 12:00         ` [LTP] [PATCH v5 2/2] syscalls/prctl09: New timer sample test for PR_SET_TIMERSLACK Yang Xu
2019-11-15 16:35           ` Cyril Hrubis
2019-11-18  1:21             ` Yang Xu
2019-11-18  2:34             ` [LTP] [PATCH v6 1/2] lib/tst_timer_test: move test setup function before PR_GET_TIMERSLACK Yang Xu
2019-11-18  2:34               ` [LTP] [PATCH v6 2/2] syscalls/prctl09: New timer sample test for PR_SET_TIMERSLACK Yang Xu
2019-11-25 11:07                 ` Cyril Hrubis
2019-11-20  6:54               ` [LTP] [PATCH v6 1/2] lib/tst_timer_test: move test setup function before PR_GET_TIMERSLACK Yang Xu
2019-11-25 10:18                 ` Yang Xu [this message]
2019-11-15  9:01         ` [LTP] [PATCH v5 1/2] syscalls/prctl08: New test for prctl() with PR_{SET, GET}_TIMERSLACK Yang Xu
2019-11-15 16:34         ` 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=95fbd060-cffb-db2a-65b0-da9f9a5d4213@cn.fujitsu.com \
    --to=xuyang2018.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.