[Discuss OpenCPI] Duration for Unit Test on Zed

James Kulp jek at parera.com
Mon Jun 25 13:34:24 EDT 2018


Just to be clear, the "duration" and "timeout" are seconds since they 
are meant to be a gross measure of time from the top level of the 
testing framework, which may even be a system that is distant from the 
actual execution.

I.e. it is rare that all the machinery being involved are fast enough 
for the difference between 1 second and 1ms  and 1 us to matter much.

That said, we could certainly change the data type to a float and allow 
sub-second times.

Having a timeout that corresponds to actual real-time execution is 
different and harder.




On 6/25/18 9:40 AM, Miller, Peter wrote:
> Thank you, sir, that will do the trick! Perhaps for the next release of AV you might consider changing duration to microseconds.
>
> From: aponchak <aponchak at office.geontech.com>
> Sent: Monday, June 25, 2018 9:25 AM
> To: Miller, Peter <PeterM at signalscape.com>
> Cc: discuss at lists.opencpi.org
> Subject: Re: [Discuss OpenCPI] Duration for Unit Test on Zed
>
>
> 1) duration and timeout are size_t (unsigned integer types), so the smallest possible is 1 sec. This variables are defined in ocpigen/src/tests.cxx, so you might try changing them to support your needs, < 1 sec.
>
> 2) Reference CDG, Section 13.3.5. Create a unique case for each platform and limit the duration.
>
> <tests>
>
> ----global (for all test cases): I/O and properties----
>
> <case OnlyPlatforms='xsim' Duration='120'>
>    ----case: I/O and properties----
> </case>
>
> <case OnlyPlatforms='zed' Duration='1'>
>    ----case: I/O and properties----
> </case>
>
> </tests>
> On 2018-06-25 08:30, Miller, Peter <PeterM at signalscape.com<mailto:PeterM at signalscape.com>> wrote:
>
> We have a unit test for a component (phy_tx_802dot11g.test) to run on xsim and on zed. The component does not emit a ZLM and so we use duration to limit the test. In xsim this is 120 seconds <case duration='120'> But for zed we need to limit it to about 100 usec. It appears that duration is in integer seconds as case duration='0.001' runs forever and the file gets big fast.
>
>
>
>
>
>    1.  How can we limit the duration of a unit test in microsec for zed?
>
>    2.  How can we write a unit tester with cases specific to zed and to xsim?
>
>
>
> Sincerely,
>
> Peter B. Miller
>
> Potomac: (301) 765-9668
>
>
>
> --------------------------- This email and any files transmitted with it are confidential and intended solely for the use of Signalscape, Inc. and the addressed individual or entity. If you have received this email in error please delete it. Information in this email may be subject to the Privacy Act of 1974 and any unauthorized review, use, disclosure, or distribution is strictly prohibited. Any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.
>
> -------------- next part --------------
>
> An HTML attachment was scrubbed...
>
> URL: <http://lists.opencpi.org/pipermail/discuss_lists.opencpi.org/attachments/20180625/5b59f618/attachment.html>
>
> _______________________________________________
>
> discuss mailing list
>
> discuss at lists.opencpi.org<mailto:discuss at lists.opencpi.org>
>
> http://lists.opencpi.org/mailman/listinfo/discuss_lists.opencpi.org
>
> --------------------------- This email and any files transmitted with it are confidential and intended solely for the use of Signalscape, Inc. and the addressed individual or entity. If you have received this email in error please delete it. Information in this email may be subject to the Privacy Act of 1974 and any unauthorized review, use, disclosure, or distribution is strictly prohibited. Any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.opencpi.org/pipermail/discuss_lists.opencpi.org/attachments/20180625/1003ec18/attachment.html>
> _______________________________________________
> discuss mailing list
> discuss at lists.opencpi.org
> http://lists.opencpi.org/mailman/listinfo/discuss_lists.opencpi.org





More information about the discuss mailing list