Re: Strange Codecov info


Alberto Escolar Piedras <ALPI@...>
 

Hi,

That line keeps coming in and out of coverage every now and then.

But I do not have a good explanation as to why.

 

The issue we had fixed with timing was due to sanitycheck being responsible for killing the testcase process when it saw the PASS/FAIL string, while the testcases actually continued executing.

The fix was to have the testcase end on its own as soon as it was done (TC_END_REPORT is called), instead of letting whatever leftover threads it had continue executing ahead.

 

Now sanitycheck should only be responsible from killing sample apps which do not use ztest. So I would only expect those kind of problems in sample apps.

 

But pthread_attr_destroy() seems to be only called from tests/posix/ . And those seem to be all ztest cases.

 

Note that the POSIX arch code we excluded for coverage can actually execute or not depending on the exact scheduling of the host OS. But the POSIX arch itself ensures that all code over the arch executes in a deterministic manner, following normal Zephyr scheduling. So nothing inside the testcase itself should be non-deterministic (unless there is uninitialized variables/memory or somebody calls rand() or similar).

 

And note that lib/posix has nothing to do with the POSIX arch.

 

BR
Alberto

 

From: Nashif, Anas [mailto:anas.nashif@...]
Sent: Monday 7 May 2018 17:26
To: David Brown <david.brown@...>; Zephyr Devel <devel@...>
Cc: Alberto Escolar Piedras <ALPI@...>
Subject: RE: Strange Codecov info

 

Alberto might shed some light, but this is a timing issue that we keep seeing. We probably want to ignore this like we did with other spots in the native posix code.

 

This can be safely be ignored.

 

Anas

 

From: devel@... [mailto:devel@...] On Behalf Of David Brown
Sent: Monday, May 7, 2018 10:59 AM
To: Zephyr Devel <devel@...>
Cc: Nashif, Anas <anas.nashif@...>
Subject: [Zephyr-devel] Strange Codecov info

 

In https://github.com/zephyrproject-rtos/zephyr/pull/7352, I am seeing an unusual Codecov report. Although my change only affects a few files in the documentation, the Codecov report is showing an impact in lib/posix/pthread.c. Any idea what is going on here?

 

Thanks,

David

 

Join {devel@lists.zephyrproject.org to automatically receive all group messages.