<div dir="ltr"><div>Configure command I used to build BSP:</div><div><div>==============================================</div></div><div>$ /home/varodek/development/rtems/kernel/rtems/configure --prefix=/home/varodek/development/rtems/5 --enable-maintainer-mode --target=riscv-rtems5 --enable-rtemsbsp=rv32imac --enable-tests --enable-posix --disable-networking --enable-cxx RISCV_ENABLE_HTIF_SUPPORT=1</div><div><div>==============================================</div><div>.<br></div><div>.</div><div>.</div><div>.</div><div>Qemu command I used to run test:</div><div><div>==============================================</div><div>$ qemu-system-riscv32 -no-reboot -nographic -machine virt -m 256M -kernel psxfenv01.exe</div><div><div>==============================================</div><div><div>.<br></div><div>.</div><div>.</div><div>.</div><div>Makefile.am</div><div><div>==============================================</div><div>+ if TEST_psxfenv01<br>+ psx_tests += psxfenv01<br>+ psxfenv01_SOURCES = psxfenv01/init.c<br>+ psxfenv01_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_psxfenv01) \<br>+ $(support_includes)<br>+ psxfenv01_LDADD = -lm $(LDADD)<br>+ endif</div><div>+<br></div><div><div>==============================================</div></div></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Aug 11, 2019 at 8:36 PM Vaibhav Gupta <<a href="mailto:vaibhavgupta40@gmail.com" target="_blank">vaibhavgupta40@gmail.com</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"><div dir="ltr"><div>My code of testsuite:</div><div>===============================================<br></div><div> /* Test 'FE_DIVBYZERO' */<br> puts( "\nDivide by zero and confirm fetestexcept()." );<br> a = 0.0;<br> b = 1.0;<br> c = b/a;<br> printf("\n%d",FE_DIVBYZERO);<br> fegetexceptflag(&excepts,FE_ALL_EXCEPT);<br> printf("\n%d",excepts);<br> r = feraiseexcept(FE_DIVBYZERO);<br> printf("\n%d\n",r);<br> rtems_test_assert( fetestexcept( FE_DIVBYZERO ) );</div><div>==============================================</div><div>OUTPUT</div><div>==============================================</div><div>Divide by zero and confirm fetestexcept().<br><br>8<br>0<br>1<br>/home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/psxtests/psxfenv01/init.c: 84 fetestexcept( FE_DIVBYZERO )<br></div><div><div>==============================================</div><div>EXPECTED OUTPUT</div><div><div>==============================================</div><div>Divide by zero and confirm fetestexcept().<br><br>8<br>8<br>0<br></div><div><div>==============================================</div></div></div><div>- fetestexcept( FE_DIVBYZERO ), should return a non-zero value as division-by-zero was performed.</div><div>.</div><div>- feraiseexcept(FE_DIVBYZERO); is also not working. It should return zero when successful</div><div>.</div><div>==============================================</div><div><br></div><div>Thank You</div><div>Vaibhav Gupta<br></div><div><br></div></div></div>
</blockquote></div>