[PATCH] testsuite/smokey: relax posix-clock time dependancy

Jan Kiszka jan.kiszka at siemens.com
Thu Dec 20 18:21:56 CET 2018


On 19.11.18 14:52, Henning Schild wrote:
> Am Mon, 19 Nov 2018 10:52:34 +0100
> schrieb Philippe Gerum <rpm at xenomai.org>:
> 
>> On 11/19/18 10:40 AM, Henning Schild wrote:
>>> Am Fri, 16 Nov 2018 07:23:47 +0100
>>> schrieb Jan Kiszka <jan.kiszka at siemens.com>:
>>>    
>>>> On 09.11.18 10:14, Henning Schild via Xenomai wrote:
>>>>> The test often asserted. This patch gives the thread a priority,
>>>>> introduces a 25us margin and prints the value in case we still
>>>>> fail.
>>>>>
>>>>> Signed-off-by: Henning Schild <henning.schild at siemens.com>
>>>>> ---
>>>>>    testsuite/smokey/posix-clock/posix-clock.c | 15 ++++++++++++++-
>>>>>    1 file changed, 14 insertions(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/testsuite/smokey/posix-clock/posix-clock.c
>>>>> b/testsuite/smokey/posix-clock/posix-clock.c index
>>>>> f672a9d52..36e0f5dea 100644 ---
>>>>> a/testsuite/smokey/posix-clock/posix-clock.c +++
>>>>> b/testsuite/smokey/posix-clock/posix-clock.c @@ -417,8 +417,10 @@
>>>>> static int clock_decrease_after_periodic_timer_first_tick(void)
>>>>>    	diff = now.tv_sec * 1000000000ULL + now.tv_nsec -
>>>>>    		(timer.it_value.tv_sec * 1000000000ULL +
>>>>> timer.it_value.tv_nsec);
>>>>> -	if (!smokey_assert(diff < 1000000000))
>>>>> +	if (!smokey_assert(diff < 1000000000ULL + 25000ULL))
>>>>> {
>>>>
>>>> Philippe, is this margin also reasonable from your perspective? Or
>>>> are we risking to miss a problem this way? I'm currently lacking a
>>>> feeling.
>>>
>>> Good question. That is an estimate suitable for x86. While it should
>>> not defeat the test, the test failing 60% of the time renders it not
>>> too useful.
>>>    
>>
>> Did you calibrate the timer shot with the autotune utility before
>> running that test?
> 
> I also saw it failing after calibration, otherwise i would have added
> the calibration to xeno-test.
> 

This discussion stranded. Philippe, if you have any further input on the value, 
that could help to resolve this.

Thanks,
Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux



More information about the Xenomai mailing list