<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 2, 2020 at 9:38 PM Gedare Bloom <<a href="mailto:gedare@rtems.org">gedare@rtems.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, Feb 25, 2020 at 7:56 AM Eshan dhawan <<a href="mailto:eshandhawan51@gmail.com" target="_blank">eshandhawan51@gmail.com</a>> wrote:<br>
><br>
> ---<br>
>  testsuites/psxtests/psxfenv01/init.c | 42 +++++++++++++++++++++++++++-<br>
>  1 file changed, 41 insertions(+), 1 deletion(-)<br>
><br>
> diff --git a/testsuites/psxtests/psxfenv01/init.c b/testsuites/psxtests/psxfenv01/init.c<br>
> index 05f3cdc880..4339139c58 100644<br>
> --- a/testsuites/psxtests/psxfenv01/init.c<br>
> +++ b/testsuites/psxtests/psxfenv01/init.c<br>
> @@ -106,7 +106,47 @@ rtems_task Init(rtems_task_argument ignored)<br>
>        printf("fesetexceptflag ==> 0x%x\n", r);<br>
>      rtems_test_assert(r == 0);<br>
</blockquote><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">>Similarly, the ability to trigger coverity scan on a<br></blockquote><div><br></div><div>How to do that, could you guide me through <br></div><div> </div><div>thanks <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> -<br>
> +<br>
> +    /*test for fegetround() and fesetround()*/<br>
add white space around text<br>
<br>
> +    /*they have four main macros to be tested seperated by ifdef*/<br>
typo: separated<br>
<br>
> +    /* since all the architectures dont support them */<br>
typo: don't<br>
grammer: "since not all architectures support them" would be better.<br>
"all the architectures don't support them" means there is no support<br>
at all.<br>
<br>
> +    /*the test cases gets and sets the rounding directions */<br>
typo: case<br>
<br>
> +#ifdef FE_TONEAREST<br>
> +<br>
no blank line needed/wanted after #ifdef statements<br>
> +    r=fegetround();<br>
<br>
whitespace needed around =. Please review<br>
<a href="https://docs.rtems.org/branches/master/eng/coding.html" rel="noreferrer" target="_blank">https://docs.rtems.org/branches/master/eng/coding.html</a><br>
<br>
> +    if(r)<br>
whitespace needed, and brackets needed even for 1-line blocks.<br>
<br>
> +       printf("fegetround ==> 0x%x\n", r);<br>
> +    rtems_test_assert(r == FE_TONEAREST) ;<br>
> +#endif<br>
> +#ifdef FE_TOWARDZERO<br>
> +<br>
The same errors from above repeat here and below. fix all.<br>
<br>
> +  r=fesetround(FE_TOWARDZERO);<br>
> +  if(r)<br>
> +       printf("fesetround ==> 0x%x\n", r);<br>
> +  rtems_test_assert(r == 0) ;<br>
> +  rtems_test_assert(fegetround() == FE_TOWARDZERO) ;<br>
> +#endif<br>
> +#ifdef FE_DOWNWARD<br>
> +<br>
> +  r=fesetround(FE_DOWNWARD);<br>
> +  if(r)<br>
> +       printf("fesetround ==> 0x%x\n", r);<br>
> +  rtems_test_assert(r == 0) ;<br>
> +  rtems_test_assert(fegetround() == FE_DOWNWARD) ;<br>
> +#endif<br>
> +#ifdef FE_UPWARD<br>
> +  r=fesetround(FE_UPWARD);<br>
> +  if(r)<br>
> +       printf("fesetround ==> 0x%x\n", r);<br>
> +  rtems_test_assert(r == 0) ;<br>
> +  rtems_test_assert(fegetround() == FE_UPWARD) ;<br>
> +#endif<br>
> +#ifdef FE_TONEAREST<br>
> +  r=fesetround(FE_TONEAREST);<br>
> +  if(r)<br>
> +       printf("fesetround ==> 0x%x\n", r);<br>
> +  rtems_test_assert(r == 0) ;<br>
> +#endif<br>
><br>
><br>
>  #ifdef FE_DIVBYZERO<br>
> --<br>
> 2.17.1<br>
><br>
> _______________________________________________<br>
> devel mailing list<br>
> <a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
> <a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
</blockquote></div></div>