diff options
Diffstat (limited to 'tester/rtems')
-rw-r--r-- | tester/rtems/testing/bsps/leon3-qemu-cov.ini | 39 | ||||
-rw-r--r-- | tester/rtems/testing/bsps/leon3-qemu.ini | 38 | ||||
-rw-r--r-- | tester/rtems/testing/coverage/Categories.txt | 19 | ||||
-rw-r--r-- | tester/rtems/testing/coverage/Explanations.txt | 35 | ||||
-rw-r--r-- | tester/rtems/testing/coverage/SPARC-Annul-Slot-Explanation.txt | 56 | ||||
-rw-r--r-- | tester/rtems/testing/coverage/score-symbols.ini | 35 | ||||
-rw-r--r-- | tester/rtems/testing/coverage/style.css | 197 | ||||
-rw-r--r-- | tester/rtems/testing/qemu.cfg | 11 | ||||
-rw-r--r-- | tester/rtems/testing/testing.mc | 8 |
9 files changed, 437 insertions, 1 deletions
diff --git a/tester/rtems/testing/bsps/leon3-qemu-cov.ini b/tester/rtems/testing/bsps/leon3-qemu-cov.ini new file mode 100644 index 0000000..6b5e7e6 --- /dev/null +++ b/tester/rtems/testing/bsps/leon3-qemu-cov.ini @@ -0,0 +1,39 @@ +# +# RTEMS Tools Project (http://www.rtems.org/) +# Copyright 2010-2018 Chris Johns (chrisj@rtems.org) +# All rights reserved. +# +# This file is part of the RTEMS Tools package in 'rtems-tools'. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + +# +# The Leon 3 QEMU BSP +# +[leon3-qemu] +bsp = leon3-qemu +arch = sparc +tester = %{_rtscripts}/qemu.cfg +bsp_qemu_opts = %{qemu_opts_base} -M leon3_generic +bsp_qemu_cov_opts = -exec-trace %{test_executable}.cov diff --git a/tester/rtems/testing/bsps/leon3-qemu.ini b/tester/rtems/testing/bsps/leon3-qemu.ini new file mode 100644 index 0000000..9e8854c --- /dev/null +++ b/tester/rtems/testing/bsps/leon3-qemu.ini @@ -0,0 +1,38 @@ +# +# RTEMS Tools Project (http://www.rtems.org/) +# Copyright 2010-2014 Chris Johns (chrisj@rtems.org) +# All rights reserved. +# +# This file is part of the RTEMS Tools package in 'rtems-tools'. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + +# +# The Leon 3 QEMU BSP +# +[leon3-qemu] +bsp = leon3-qemu +arch = sparc +tester = %{_rtscripts}/qemu.cfg +bsp_qemu_opts = %{qemu_opts_base} -M leon3_generic diff --git a/tester/rtems/testing/coverage/Categories.txt b/tester/rtems/testing/coverage/Categories.txt new file mode 100644 index 0000000..e19a456 --- /dev/null +++ b/tester/rtems/testing/coverage/Categories.txt @@ -0,0 +1,19 @@ +This is the list of Explanation Categories used when analyzing RTEMS +Coverage report. By using standard categories, the table filter on +the web site works better. + +Simple Test Case + +Hard Test Tase + +Uncalled Routine + +Interrupt Critical Section + +Simple Error Case + +Hard Error Case + +Allocation Error + +Bharath Suri diff --git a/tester/rtems/testing/coverage/Explanations.txt b/tester/rtems/testing/coverage/Explanations.txt new file mode 100644 index 0000000..a5917f6 --- /dev/null +++ b/tester/rtems/testing/coverage/Explanations.txt @@ -0,0 +1,35 @@ +schedulerpriorityyield.c:47 +Simple Test Case +Branch Never Taken +New test where there is more than one thread at a priority with the +executing thread being non-preemptive. Create a higher priority thread +and then yield. + + init task at priority 2, non-preemptive + create task at priority 2 + create task at priority 1 + yield ++++ + +schedulerpriorityyield.c:51 +Simple Test Case +Branch Always Taken +New test where only one thread at a priority (non-preemptive), create a +thread at higher priority, then yield. + + init task at priority 2, non-preemptive + create task at priority 1 + yield ++++ + +schedulerpriorityyield.c:52 +Simple Test Case +Not Executed +Same test case as schedulerpriorityyield.c:51 ++++ + +coremsg.c:86 +Simple Test Case +We need to request enough messages of a certain size that the math +overflows to less than a single message. ++++ diff --git a/tester/rtems/testing/coverage/SPARC-Annul-Slot-Explanation.txt b/tester/rtems/testing/coverage/SPARC-Annul-Slot-Explanation.txt new file mode 100644 index 0000000..ef740d3 --- /dev/null +++ b/tester/rtems/testing/coverage/SPARC-Annul-Slot-Explanation.txt @@ -0,0 +1,56 @@ +The SPARC assembly is often hard to understand because a single +instruction will show up as not executed. The instructions before +and after it will be marked as executed. The instruction before +the one not executed should be a "bxx,a" instruction which means +that the instruction following the branch instruction is executed +ONLY if the branch is taken. Otherwise it is "annulled" or skipped. + +So when you see these cases, it means the branch was NOT taken. + +=================================================================== +Subject: <offlist> annul slot explanation +From: Jiri Gaisler <jiri@gaisler.com> +Date: Wed, 3 Jun 2009 14:57:48 -0500 +To: Joel Sherrill <Joel.Sherrill@OARcorp.com> + + +Joel Sherrill wrote: +> > Hi, +> > +> > I am trying to look at more coverage cases and +> > wanted to make sure I am reading things correctly. +> > +> > The code in question is: +> > +> > +> > if ( the_thread->current_priority > interested_priority ) +> > 200fd00: d8 00 e0 14 ld [ %g3 + 0x14 ], %o4 +> > 200fd04: 80 a3 00 04 cmp %o4, %g4 +> > 200fd08: 38 80 00 1c bgu,a 200fd78 <killinfo+0x224> +> > 200fd0c: 98 10 00 04 mov %g4, +> > %o4 <== NOT EXECUTED +> > +> > /* +> > * If this thread is not interested, then go on to the next thread. +> > */ +> > +> > api = the_thread->API_Extensions[ THREAD_API_POSIX ]; +> > 200fd10: d4 00 e1 6c ld [ %g3 + 0x16c ], %o2 +> > +> > Am I correct in interpreting this as meaning 0x200fd0c +> > is not executed because the bgu,a is never taken. And it +> > is not executed as part of falling through. + +Yes, this is correct. The branch delay slot is only executed +when the branch is taken. + +Jiri. + +> > +> > So in this case we need a test where the "if" condition +> > is true if I am reading things correctly. +> > +> > Thanks. There are a number of these 4 byte cases which +> > are probably easy to hit if I read the code correctly. +> > +> > diff --git a/tester/rtems/testing/coverage/score-symbols.ini b/tester/rtems/testing/coverage/score-symbols.ini new file mode 100644 index 0000000..b3c8b18 --- /dev/null +++ b/tester/rtems/testing/coverage/score-symbols.ini @@ -0,0 +1,35 @@ +# +# RTEMS Tools Project (http://www.rtems.org/) +# Copyright 2018 Chris Johns (chrisj@rtems.org) +# All rights reserved. +# +# This file is part of the RTEMS Tools package in 'rtems-tools'. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + +[symbol-sets] +sets = score + +[score] +libraries=@BUILD-TARGET@/c/@BSP@/cpukit/score/libscore.a diff --git a/tester/rtems/testing/coverage/style.css b/tester/rtems/testing/coverage/style.css new file mode 100644 index 0000000..c715518 --- /dev/null +++ b/tester/rtems/testing/coverage/style.css @@ -0,0 +1,197 @@ +body { + background: rgb(253,253,253); + color: rgb(0,0,0); + font-family: helvetica, sans-serif; + font-size: 1em; + line-height: 1.4; + margin: 5px, 5px, 5px, 5px; + padding: 0; +} + +a:link { + color: rgb(180, 50, 50); + font-family: helvetica, sans-serif; + font-size: 1.0em; +} + +a:visited { + color: purple; + font-family: helvetica, sans-serif; + font-size: 1.0em; +} + +a:hover { + color: rgb(0, 0, 0); + font-family: helvetica, sans-serif; + font-size: 1.0em; +} + +a:active { + color: red; + font-family: helvetica, sans-serif; + font-size: 1.0em; +} + +.heading { + background: rgb(250,250,250); + background-image: url("http://www.rtems.org/logos/rtems_logo.jpg"); + background-repeat: no-repeat; + color: rgb(55,55,55); + font-size: 1.5em; + height: 140px; + padding-top: 20px; + padding-left: 300px; +} + +.heading-title { + text-align: center; + color: rgb(0,0,0); + font-size: 0.9em; + font-weight: bold; + padding-top: 5px; + padding-left: 0px; + text-align: center; + width: 100%; +} + +.datetime { + color: rgb(55,55,55); + font-size: 0.8em; + padding-top: 5px; + padding-left: 0px; + text-align: center; + width: 100%; +} + +.info { + color: rgb(55,55,55); + font-size: 0.6em; + padding-top: 5px; + padding-left: 00px; + text-align: center; + width: 100%; +} + +.stats-table { + background: rgb(225,225,225); + font-size: 0.9em; + border: 1px solid rgb(200, 200, 200); + padding: 0; + margin-top: 3px; + margin-left: 10px; + width: 70%; +} + +.stats-table-target { + background: rgb(243,243,243); + font-size: 1.2em; + padding-left: 10px; + text-align: left; +} + +.stats-target-results { + background: rgb(243,243,243); + font-size: 0.9em; + text-align: right; + padding-right: 10px; +} + +.stats-target-good { + background: rgb(30,230,30); + font-size: 0.9em; + text-align: right; + padding-right: 10px; +} + +.stats-target-good { + background: rgb(50,180,50); + color: rgb(230,230,230); + font-size: 0.9em; + text-align: center; + padding-right: 10px; +} + +.stats-target-bad { + background: rgb(180,50,50); + color: rgb(230,230,230); + font-size: 0.9em; + text-align: center; + padding-right: 10px; +} + +.stats-table-top { + background: rgb(243,243,243); + color: rgb(0,0,0); + font-size: 0.9em; + padding-left: 2px; +} + +.stats-table-row { + background: rgb(253,253,253); + font-size: 0.9em; + padding: 1px; + text-align: right; +} + +.error-table { + font-size: 0.9em; + border: 1px solid rgb(200, 200, 200); + padding: 0; + margin-left: 10px; + width: 96%; +} + +.error-table-top { + background: rgb(225,225,225); + color: rgb(0,0,0); + font-size: 0.9em; + padding-left: 2px; +} + +.error-table-on { + background: rgb(225,225,225); + font-size: 0.9em; + padding-left: 2px; +} + +.error-table-off { + background: rgb(253,253,253); + font-size: 0.9em; + padding-left: 2px; +} + +.error-table-dups { + text-align: right; + padding-right: 2px; +} + +.error-table-error { + background: rgb(255,150,150); + font-size: 0.9em; + padding-left: 2px; +} + +.error-table-warning { + font-size: 0.9em; + padding-left: 2px; +} + +.navbar { + margin-left: auto; + margin-right: auto; + margin-top: 10px; + width: 40%; +} +th.table-sortable { + background-image:url("unsorted.gif"); + cursor: pointer; + background-position: center left; + background-repeat: no-repeat; + padding-left: 15px; +} +th.table-sorted-asc { + background-image:url("descending.gif"); +} +th.table-sorted-desc { + background-image:url("ascending.gif"); +}
\ No newline at end of file diff --git a/tester/rtems/testing/qemu.cfg b/tester/rtems/testing/qemu.cfg index db5b6b2..bfcd2f5 100644 --- a/tester/rtems/testing/qemu.cfg +++ b/tester/rtems/testing/qemu.cfg @@ -54,14 +54,23 @@ #%define qemu_opts_base -no-reboot -monitor none -serial stdio -nographic %define qemu_opts_base -no-reboot -serial null -serial mon:stdio -nographic %define qemu_opts_no_net -net none + +# +# Coverage, some builds of qemu support coverage. +# +%ifn %{defined bsp_qemu_cov_opts} + %define bsp_qemu_cov_opts %{nil} +%endif + # # Qemu executable # %ifn %{defined bsp_qemu_opts} %define bsp_qemu_opts %{nil} %endif + %define qemu_cmd qemu-system-%{bsp_arch} -%define qemu_opts %{bsp_qemu_opts} +%define qemu_opts %{bsp_qemu_opts} %{bsp_qemu_cov_opts} # # Executable diff --git a/tester/rtems/testing/testing.mc b/tester/rtems/testing/testing.mc index 77f8419..662b352 100644 --- a/tester/rtems/testing/testing.mc +++ b/tester/rtems/testing/testing.mc @@ -55,3 +55,11 @@ timeout: none, none, '180' # Tests detected as invalid that are valid invalid_tests: none, none, '''minimum.exe''' + +# Coverage defaults +cov_format: none, none, 'QEMU' +cov_explanations: none, none, '%{_rtscripts}/coverage/Explanations.txt' +cov_extension: none, none, 'cov' +cov_gcnos_file: none, none, '%{_rtscripts}/coverage/rtems.gcnos' +cov_exe_ext: none, none, 'exe' +cov_report_format: none, none, 'html' |