<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 4 Feb 2020 at 13:28, Vijay Kumar Banerjee <<a href="mailto:vijaykumar9597@gmail.com">vijaykumar9597@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="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Feb 4, 2020, 11:33 AM Bran S <<a href="mailto:archsbran@gmail.com" target="_blank">archsbran@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">On Saturday, 1 February 2020, Vijay Kumar Banerjee <<a href="mailto:vijaykumar9597@gmail.com" rel="noreferrer" target="_blank">vijaykumar9597@gmail.com</a>> wrote:<br>><br>><br>><br>> On Sat, Feb 1, 2020 at 9:31 PM Bran S <<a href="mailto:archsbran@gmail.com" rel="noreferrer" target="_blank">archsbran@gmail.com</a>> wrote:<br>>><br>>> On Sat, 1 Feb 2020 at 18:44, Vijay Kumar Banerjee <<a href="mailto:vijaykumar9597@gmail.com" rel="noreferrer" target="_blank">vijaykumar9597@gmail.com</a>> wrote:<br>>> ><br>>> > On Sat, Feb 1, 2020 at 12:57 PM Bran S <<a href="mailto:archsbran@gmail.com" rel="noreferrer" target="_blank">archsbran@gmail.com</a>> wrote:<br>>> >><br>>> >> On Thu, 30 Jan 2020 at 05:52, Chris Johns <<a href="mailto:chrisj@rtems.org" rel="noreferrer" target="_blank">chrisj@rtems.org</a>> wrote:<br>>> >> ><br>>> >> > On 29/1/20 7:03 pm, Bran S wrote:<br>>> >> > > Hi Guys,<br>>> >> > ><br>>> >> > > I am trying to solve #3515<br>>> >> > > <a href="https://devel.rtems.org/ticket/3515" rel="noreferrer" target="_blank">https://devel.rtems.org/ticket/3515</a> <<a href="https://devel.rtems.org/ticket/3515" rel="noreferrer" target="_blank">https://devel.rtems.org/ticket/3515</a>><br>>> >> ><br>>> >> > Nice and thanks.<br>>> >> ><br>>> >> > > For this issue covoar is required.<br>>> >> > ><br>>> >> > > So I cloned <a href="https://git.rtems.org/rtems-tools/" rel="noreferrer" target="_blank">https://git.rtems.org/rtems-tools/</a> <<a href="https://git.rtems.org/rtems-tools/" rel="noreferrer" target="_blank">https://git.rtems.org/rtems-tools/</a>><br>>> >> > > This is my directory structure:<br>>> >> > > $HOME/quick-start/src/rtems - Main RTEMS repo<br>>> >> > > $HOME/quick-start/src/rsb - Source Builder<br>>> >> > > $HOME/quick-start/src/rtems-tools - The one that I have recently cloned<br>>> >> > ><br>>> >> > > But running `rtems-test --list-bsps` inside '$HOME/quick-start/src/rtems-tools'<br>>> >> > > gives "error: RTEMS Toolkit python wrapper not found, plrease report"<br>>> >> > ><br>>> >> > > Any ideas on how to resolve this error ?<br>>> >> ><br>>> >> > What does `type rtems-test` say?<br>>> >> ><br>>> >> > Have you built a set of sparc tools?<br>>> >> > Have you build the leon3 BSP and all the tests?<br>>> >> ><br>>> >> > I am not sure what happens if the `rtems-test` is run in the source tree while<br>>> >> > picking up a version from your path. Maybe `./tester/rtems-test ...` works?<br>>> >><br>>> > Hi Bran,<br>>> ><br>>> > Thanks for taking up this ticket.<br>>> >><br>>> >> It is now working my $PATH was wrongly set with rtems/4.11 instead of rtems/5.<br>>> >> I have corrected it. It now contains '$HOME/quick-start/rtems/5/bin'<br>>> >><br>>> > Nice.<br>>> >><br>>> >> Moving on to the next problem:<br>>> >> <a href="https://devel.rtems.org/wiki/GCI/Documentation/CoverageAnalysis/Coverage#RunningRTEMS-TESTERforCoverageanalysis" rel="noreferrer" target="_blank">https://devel.rtems.org/wiki/GCI/Documentation/CoverageAnalysis/Coverage#RunningRTEMS-TESTERforCoverageanalysis</a><br>>> >> I was reading this to know more about covoar.<br>>> >> So as mentioned above I ran<br>>> >><br>>> >> `rtems-test --rtems-tools=/home/user45/quick-start/rtems/5/<br>>> >> --log=coverage_analysis.log --no-clean --coverage=score<br>>> >> --rtems-bsp=leon3-qemu-cov<br>>> >> /home/user45/quick-start/build/b-leon3/sparc-rtems5/c/leon3/testsuites/samples/hello.exe`<br>>> >><br>>> >> And the output was: <a href="https://paste.debian.net/1128608/" rel="noreferrer" target="_blank">https://paste.debian.net/1128608/</a><br>>> >> `qemu-system-sparc` not being installed seems to be the cause for the error.<br>>> >><br>>> >> So I followed suggestion found here:<br>>> >> <a href="https://lists.rtems.org/pipermail/users/2018-January/065583.html" rel="noreferrer" target="_blank">https://lists.rtems.org/pipermail/users/2018-January/065583.html</a><br>>> >> Ran the commands as:<br>>> >><br>>> >> $ cd /quick-start/src/rsb/rtems/<br>>> >> The rsb directory contains rtems source builder.<br>>> >><br>>> >> $ ../source-builder/sb-set-builder --prefix=$HOME/quick-start/rtems/5<br>>> >> devel/qemu.bset<br>>> >><br>>> > You need devel/qemu-couverture.bset but while trying to build it, I see the same error<br>>> > as you see with qemu.bset<br>>> >><br>>> >> Running this further gives errors and reports it into<br>>> >> 'rsb-report-glib-2.39.3-x86_64-linux-gnu-1.txt'<br>>> >> Full output of above command is at: <a href="https://paste.debian.net/1128609/" rel="noreferrer" target="_blank">https://paste.debian.net/1128609/</a><br>>> >><br>>> >> The content of 'rsb-report-glib-2.39.3-x86_64-linux-gnu-1.txt' is<br>>> >> here: <a href="https://paste.debian.net/1128610/" rel="noreferrer" target="_blank">https://paste.debian.net/1128610/</a><br>>> >><br>>> >> In file 'rsb-report-glib-2.39.3-x86_64-linux-gnu-1.txt' (at<br>>> >> <a href="https://paste.debian.net/1128610/" rel="noreferrer" target="_blank">https://paste.debian.net/1128610/</a>) the first error occurs at line 385,<br>>> >> which is:<br>>> >><br>>> >> ../../glib-2.39.3/glib/gdate.c:2497:7: error: format not a string<br>>> >> literal, format string not checked [-Werror=format-nonliteral]<br>>> >> tmplen = strftime (tmpbuf, tmpbufsize, locale_format, &tm);<br>>> >> ^~~~~~<br>>> >> CC libglib_2_0_la-gdir.lo<br>>> >> CC libglib_2_0_la-genviron.lo<br>>> >> cc1: some warnings being treated as errors<br>>> >> Makefile:1782: recipe for target 'libglib_2_0_la-gdate.lo' failed<br>>> >> make[4]: *** [libglib_2_0_la-gdate.lo] Error 1<br>>> >><br>>> >> This happens to be a known error/bug (Ref:<br>>> >> <a href="https://bugs.freedesktop.org/show_bug.cgi?id=95326" rel="noreferrer" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=95326</a>)<br>>> >> and a patch is available for it here:<br>>> >> <a href="https://gitlab.gnome.org/GNOME/glib/commit/8cdbc7fb2c8c876902e457abe46ee18a0b134486" rel="noreferrer" target="_blank">https://gitlab.gnome.org/GNOME/glib/commit/8cdbc7fb2c8c876902e457abe46ee18a0b134486</a><br>>> >><br>>> >> Following the patch I manually made changes into<br>>> >> '$HOME/quick-start/src/rsb/rtems/build/glib-2.39.3-x86_64-linux-gnu-1/glib-2.39.3/glib/gdate.c'<br>>> >><br>>> >> But the problem is that as soon as I run<br>>> >> `../source-builder/sb-set-builder --prefix=$HOME/quick-start/rtems/5<br>>> >> devel/qemu.bset`<br>>> >> My manual changes to the gdate.c disappear and I get the same error as<br>>> >> before. I don't know what is going on.<br>>> >><br>>> > I applied the patch that you found along with another patch and built the souces, glib built<br>>> > successfully, but unfortunately the couverture-qemu itself failed to build. Here's the log:<br>>> > <a href="https://paste.ofcode.org/KmJCNZrJyQNev6R4FSUafe" rel="noreferrer" target="_blank">https://paste.ofcode.org/KmJCNZrJyQNev6R4FSUafe</a><br>>> ><br>>> > Here I'm pasting the diff to add patches to RSB:<br>>> > ```<br>>> > diff --git a/bare/config/devel/glib-2.39.3-1.cfg b/bare/config/devel/glib-2.39.3-1.cfg<br>>> > index d86fe28..0bada15 100644<br>>> > --- a/bare/config/devel/glib-2.39.3-1.cfg<br>>> > +++ b/bare/config/devel/glib-2.39.3-1.cfg<br>>> > @@ -14,6 +14,10 @@<br>>> > <br>>> > %hash sha256 glib-%{glib_version}.tar.xz d9fa6c9aa645a5e688a3bb29013bb83801b19ee767d99e33ff52e004e1cc5fc8<br>>> > <br>>> > +#Patch to supress string literal warning<br>>> > +<br>>> > +%patch add glib <a href="https://gitlab.gnome.org/GNOME/glib/commit/0817af40e8c74c721c30f6ef482b1f53d12044c7.patch" rel="noreferrer" target="_blank">https://gitlab.gnome.org/GNOME/glib/commit/0817af40e8c74c721c30f6ef482b1f53d12044c7.patch</a><br>>> > +%patch add glib <a href="https://gitlab.gnome.org/GNOME/glib/commit/566e1d61a500267c7849ad0b2552feec9c9a29a6.patch" rel="noreferrer" target="_blank">https://gitlab.gnome.org/GNOME/glib/commit/566e1d61a500267c7849ad0b2552feec9c9a29a6.patch</a><br>>> > #<br>>> > # The GLib build instructions. We use 2.x.x Release 1.<br>>> > #<br>>> > ```<br>>> ><br>>> > You can apply the above diff into your rtems-source-builder and try to build couverture qemu.<br>>> > Most likely it will fail it seems.<br>>> >><br>>> >><br>>> >> After this I found out that `qemu4.bset` is also present so I ran<br>>> >> $ ../source-builder/sb-set-builder --prefix=$HOME/quick-start/rtems/5<br>>> >> devel/qemu4.bset<br>>> >><br>>> >> It seems to have run successfully here is the full output:<br>>> >> <a href="https://paste.debian.net/1128611/" rel="noreferrer" target="_blank">https://paste.debian.net/1128611/</a><br>>> >><br>>> >> Seems like qemu-system-sparc is now installed. But still while running<br>>> >><br>>> >> `rtems-test --rtems-tools=/home/user45/quick-start/rtems/5/<br>>> >> --log=coverage_analysis.log --no-clean --coverage=score<br>>> >> --rtems-bsp=leon3-qemu-cov<br>>> >> /home/user45/quick-start/build/b-leon3/sparc-rtems5/c/leon3/testsuites/samples/hello.exe`<br>>> >><br>>> >> I get the same error related to qemu-system-sparc.<br>>> >> Here is the full output: <a href="https://paste.debian.net/1128612/" rel="noreferrer" target="_blank">https://paste.debian.net/1128612/</a><br>>> >><br>>> >> But this time there is a little difference.<br>>> >> Earlier it exited with exit code 2. see (<a href="https://paste.debian.net/1128608/" rel="noreferrer" target="_blank">https://paste.debian.net/1128608/</a>)<br>>> >> Now it is exiting with exit code 1. see (<a href="https://paste.debian.net/1128612/" rel="noreferrer" target="_blank">https://paste.debian.net/1128612/</a>)<br>>> >> Note: To see the exit code on the above 2 links you may have to use<br>>> >> the horizontal scroll.<br>>> >><br>>> >> What am I doing wrong ? Please suggest a way to solve this. I am just<br>>> >> trying to run a simple rtems-test coverage.<br>>> ><br>>> > For now, I suggest you to use --rtems-bsp=leon3-sis-cov instead of qemu,<br>>> > this is give you the reports and you can start focusing on your main ticket.<br>>> ><br>>><br>>><br>>> Thanks for the suggestion, leon3-sis-cov works, with a minor error as:<br>>><br>>> error: copying tree (4):<br>>> /home/user45/quick-start/rtems/5/share/rtems/tester/covoar/covoar.css<br>>> -> /home/user45/quick-start/leon3-sis-coverage/score: [Errno 2] No<br>>> such file or directory:<br>>> '/home/user45/quick-start/rtems/5/share/rtems/tester/covoar/covoar.css'<br>>><br>> This was fixed a few days ago. Please update to the current HEAD of rtems-tools and<br>> do a `./waf clean build install` <br>>><br>>> But the leon3-sis-report.html gives the coverage report. I am still<br>>> studying the leon3-sis-coverage directory.<br>>><br>> Great!<br>> After updating the rtems-tools, go for a full samples directory run.<br>> (just replace the /path/to/samples/hello.exe in your command with /path/to/samples/ )<br>> <br><br><br>I am trying to understand ticket #3515<br><a href="https://devel.rtems.org/ticket/3515" rel="noreferrer" target="_blank">https://devel.rtems.org/ticket/3515</a><br><br>So I ran the below commands.<br><br>$ rtems-test --rtems-tools=/home/user45/quick-start/rtems/5/ --log=coverage_analysis.log --no-clean --coverage=score --rtems-bsp=leon3-sis-cov /home/user45/quick-start/build/b-leon3/sparc-rtems5/c/leon3/testsuites/fstests/fsclose01.exe<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">The command is correct but it's running coverage for "score" only.</div><div dir="auto"><br></div><div dir="auto">The --coverage option, if added without any argument, will run the coverage analysis of the exe for all the subsystems (like score, posix, rtems etc.)</div><div dir="auto"><br></div><div dir="auto">From the ticket: It looks like covoar is failing for fsclose01.exe under posix.</div><div dir="auto">To test that, you can either just add --coverage option without any argument and wait for it to fail in posix, or you can just add --coverage=posix since we just want to check posix.</div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>$ /home/user45/quick-start/rtems/5/share/rtems/tester/bin/covoar -vvvv -S /home/user45/quick-start/rtems/5/share/rtems/tester/rtems/testing/coverage/leon3-sis-symbols.ini -O leon3-sis-coverage -E /home/user45/quick-start/rtems/5/share/rtems/tester/rtems/testing/coverage/Explanations.txt -p RTEMS-5 /home/user45/quick-start/build/b-leon3/sparc-rtems5/c/leon3/testsuites/fstests/fsclose01.exe<br><br>The Output is at: <a href="https://gofile.io/?c=xQKwul" rel="noreferrer" target="_blank">https://gofile.io/?c=xQKwul</a><br><br>#3515 says that the covoar fails for fstests/fsclose01.exe<br>Although I do not understand the output entirely but it looks as if covoar on fstests/fsclose01.exe did not fail because when I run covoar on samples/hello.exe the output is similar.<br><br>The content of leon3-sis-coverage/ExplanationsNotFound.txt:<br>coremsg.c:86<br>schedulerpriorityyield.c:47<br>schedulerpriorityyield.c:51<br>schedulerpriorityyield.c:52<br><br>The strange part is line 86 in quick-start/src/rtems/cpukit/score/src/coremsg.c is a comment.<br><br>And there is no line 47,51,52 in quick-start/src/rtems/cpukit/score/src/schedulerpriorityyield.c<br><br>Do these numbers not represent line numbers ? If not, what do they represent ?<br></blockquote></div></div><div dir="auto">The do represent line numbers and it looks like you found some discrepancy. I would suggest you to try some other combinations of exe and subsystems to see if you find any pattern. This will help you understand if it's only with these exes or is this a problem in general.</div></div></blockquote><div><br></div><div><br></div><div><div>Command:<br></div><span class="gmail-im">$ /home/user45/quick-start/rtems/5/share/rtems/tester/bin/covoar -vvvv -S /home/user45/quick-start/rtems/5/share/rtems/tester/rtems/testing/coverage/leon3-sis-symbols.ini -O leon3-sis-coverage -E /home/user45/quick-start/rtems/5/share/rtems/tester/rtems/testing/coverage/Explanations.txt -p RTEMS-5 /home/user45/quick-start/build/b-leon3/sparc-rtems5/c/leon3/testsuites/fstests/fsclose01.exe<br><div><br></div></span><div>Output:</div><div>...<br></div>error: ExecutableInfo::findCoverageMap: wait<br><br>Found findCoverageMap in /home/user45/quick-start/src/rtems-tools/tester/covoar/ExecutableInfo.cc:124<br>If I want to make some changes into the file, how to make those changes, to take effect ?<br>I
should mention that the covoar binary used in the command above was not
created via rtems-tools repository directly. It was built according to
the instructions in the quick-start guide. <br></div></div></div>