[PATCH] sppps01: Add test case for early returns of pps_event()

Kinsey Moore kinsey.moore at oarcorp.com
Fri Jul 15 14:43:45 UTC 2022


This change seems to have made the test intermittently failing on 
AArch64 under QEMU:

*** BEGIN OF TEST SPPPS 1 ***
*** TEST VERSION: 6.0.0.4142fd12385473426b461560b76cee6e903dc2cd
*** TEST STATE: EXPECTED_PASS
*** TEST BUILD: RTEMS_POSIX_API RTEMS_SMP
*** TEST TOOLS: 12.1.1 20220622 (RTEMS 6, RSB 
a4608ce16e94066aea82f22849e24d4fcd90699b, Newlib 27fd806)
A:SPPPS 1
S:Platform:RTEMS
S:Compiler:12.1.1 20220622 (RTEMS 6, RSB 
a4608ce16e94066aea82f22849e24d4fcd90699b, Newlib 27fd806)
S:Version:6.0.0.4142fd12385473426b461560b76cee6e903dc2cd
S:BSP:xilinx_zynqmp_lp64_qemu
S:BuildLabel:DEFAULT
S:TargetHash:SHA256:huGRj7kHeBWgSJolmeboNSyCgeX2U62J9RiNQ18YPFc=
S:RTEMS_DEBUG:0
S:RTEMS_MULTIPROCESSING:0
S:RTEMS_POSIX_API:1
S:RTEMS_PROFILING:0
S:RTEMS_SMP:1
B:WakeupTaskWithPPSEvent
P:0:0:UI1:init.c:195
P:1:0:UI1:init.c:209
P:2:0:UI1:init.c:211
P:3:0:PPSE:init.c:160
P:4:0:UI1:init.c:214
P:5:0:PPSE:init.c:162
P:6:0:PPSE:init.c:164
P:7:0:UI1:init.c:221
E:WakeupTaskWithPPSEvent:N:8:F:0:D:0.008009
B:WaitPPSEventDefaultHandler
P:0:0:UI1:init.c:73
P:1:0:UI1:init.c:77
E:WaitPPSEventDefaultHandler:N:2:F:0:D:0.000508
B:PPSEventEarlyReturns
P:0:0:UI1:init.c:103
P:1:0:UI1:init.c:110
F:2:0:UI1:init.c:115:1 == 0
F:3:0:UI1:init.c:119:2 == 1
E:PPSEventEarlyReturns:N:4:F:2:D:0.001525
Z:SPPPS 1:C:3:N:14:F:2:D:0.013109
Y:ReportHash:SHA256:B-CITRKa5X9NJy8JfEPbCr_F_tm6UNBuwfKzHcxhWks=

[ RTEMS shutdown ]
CPU: 0
RTEMS version: 6.0.0.4142fd12385473426b461560b76cee6e903dc2cd
RTEMS tools: 12.1.1 20220622 (RTEMS 6, RSB 
a4608ce16e94066aea82f22849e24d4fcd90699b, Newlib 27fd806)
executing thread ID: 0x08a010001
executing thread name: UI1


It appears to work consistently on hardware (at least for a sample size 
of around 10 test runs) and before this patch it worked consistently on 
QEMU as well.


Kinsey


On 6/30/2022 01:26, Sebastian Huber wrote:
>
>
> On 15/06/2022 15:08, Gabriel Moyano wrote:
>> ---
>>   testsuites/sptests/sppps01/init.c | 42 +++++++++++++++++++++++++++++++
>>   1 file changed, 42 insertions(+)
>>
>> diff --git a/testsuites/sptests/sppps01/init.c 
>> b/testsuites/sptests/sppps01/init.c
>> index 996a3a1e16..ee3fe1645b 100644
>> --- a/testsuites/sptests/sppps01/init.c
>> +++ b/testsuites/sptests/sppps01/init.c
>> @@ -76,6 +76,48 @@ T_TEST_CASE( WaitPPSEventDefaultHandler )
>>     T_eq_int( status, ETIMEDOUT );
>>   }
>>   +static int wokenup = 0;
>> +
>> +static void fake_wakeup(struct pps_state *pps)
>> +{
>> +    wokenup++;
>> +}
>
> I would move the wokenup into struct test_pps_device.
>
> In the existing code, use rtems_task_exit() instead of 
> rtems_task_delete(rtems_task_self()).
>


More information about the devel mailing list